Re: [Freedos-kernel] PATCH: sys fix
Hi Bart, thanks for making the patch much shorter, very commitable now :-) Why did our old code do that complex put bp at [bp+2] thing? And what does the cpm_error jump decision now inverted patch mean? Eric This is a minimal fix for [entry.asm] ... -pushbp ; trash old return address -mov bp,sp -xchgbp,[2+bp] -pop bp +add sp,2; trash old return address ... cmp cl,024h -jbe cpm_error +ja cpm_error ... -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] PATCH: sys fix
On Fri, May 1, 2009 at 4:01 AM, Eric Auer e.a...@jpberlin.de wrote: Hi Bart, thanks for making the patch much shorter, very commitable now :-) Why did our old code do that complex put bp at [bp+2] thing? And don't know what does the cpm_error jump decision now inverted patch mean? skips the call to int21 if the value in cl is 24h, ie limits the call to int 21h functions 0-24h before it incorrectly limited the calls to functions 24h Eric This is a minimal fix for [entry.asm] ... ... cmp cl,024h - jbe cpm_error + ja cpm_error ... Jeremy -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] PATCH: sys fix
2009/5/1 Eric Auer e.a...@jpberlin.de: Why did our old code do that complex put bp at [bp+2] thing? I don't know; it is old code from Pat Villani. Perhaps it wanted to do an extra pop bp from that place but bp was already set to sp so that would be wrong too. -pushbp ; trash old return address -mov bp,sp -xchgbp,[2+bp] -pop bp Bart -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] PATCH: sys fix
- Christian: entry.asm revamp to fix the CP/M call (review!) http://sf.net/tracker/?func=3Ddetailaid=3D2421577group_id=3D5109atid= =3D105109 anyone know of any CP/M like programs or applications to test these with? There's some C library based on the CALL 5 but I never used it. My test case was setting up the correct registers (function in cl instead of ah, only functions 00h..24h valid) then using a call 5 in DEBUG. (Be sure to use FreeDOS's DEBUG because MS-DOS's apparently corrupts the CALL 5 handler inside the PSP.) Here's an example DEBUG script: === CUT HERE === a mov ax, sp mov cl, 2 mov dl, 21 call 5 int 3 nop g q === CUT HERE === If the handler works, it will display an exclamation mark (Int21.02, display character) in front of the first line of DEBUG's register output. DEBUG should show the disassembled NOP or (depending on the version, maybe) the INT 03 on the next line. Make sure the displayed ax register equals sp, which it should do if the handler returns the stack correctly. If the handler doesn't work it might crash the system or do something random. Regards, Christian -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] PATCH: sys fix
On Thu, Apr 30, 2009 at 8:18 PM, Bart Oldeman bartolde...@users.sourceforge.net wrote: ... This is a minimal fix for the kernel: --- entry.asm (révision 1371) +++ entry.asm (copie de travail) ... This bug has been there since the DOS-C days by the way! Bart Thank you! Patch committed along with some comments to help explain what is going on. ... near call to psp:05h which in turn is a far call to 0:0Ch embedded in the psp with the value embedded at psp:06h also the size of the com file (more or less) for CP/M compatibility and 0:0Ch (overlapping where address for int 30h 31h would be) contains the code to do a far jmp to the code in entry.asm which is where the bug was and now correctly strips the bad return offset and rearranges the stack to match an int 21h call. Additionally limiting this whole tromp around memory to function codes 0 through 24h. Jeremy -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] PATCH: sys fix
Hi Bart, admins, others, Would you like to have access again? Should be no problem :-) Sure! Apparently only Aitor, Jim and Pat can give you SVN write access but I think that would be a *very* nice idea... ;-). I noticed Pat already uploaded your SYS OW 1.8 fix :-). If you plan to patch things overlapping those things listed below, please announce so we can coordinate. You may also want to read the state of kernel 2037 and state of kernel 2038 threads on the freedos-user in Feb 2009. High on the wishlist for 2037 would be extending that SVN changelog wiki page and a backport of country sys support to 2038 stable. Eduardo may be considering to work on that backport... For SYS, I would suggest an option to enforce either LBA or CHS style boot, in particular for FAT32, via the command line. The wishlist for the stable 2038 kernel is quite short: Insert patches listed below, update changelog file and make a SF file release :-). Patches waiting here for review, comments, uploading: - *Bart*: SYS compileability with OpenWatcom C 1.8 and newer (in SVN) - Eric: dosfns.c / fatfs.c / proto.h SHARE tuning (safe afair) - Christian: entry.asm revamp to fix the CP/M call (review!) http://sf.net/tracker/?func=detailaid=2421577group_id=5109atid=105109 - Any: (?) update changelog, update my email addr in the docs http://freedos.svn.sourceforge.net/viewvc/freedos/kernel/trunk/?view=log - RayeR: init-mod.h always say BSS_INIT(x)=x (workaround OW bug?) - Tom: inthndlr.c bugfix for int 21.1c no-FAT case - RayeR: initdisk.c CHS cyl off-by-one and total_sectors overflow and DebugPrintf drive param format string fixes - Any: If DSSI points to partn (00 or 80) in FAT16/32 boot sector then take partn offset from DSSI+x (I *had* a patch but where??) - Eric: re-enable drive access flag handling to make unformatted drives more properly unformatted, disk tools should be fine now? - Christian: patch related to exit/resident if self-owned PSP (he pasted the patch in a recent thread on the mailing list) - Any: (Eric?) support 4 GB file size by changing sft_size, sft_posit to unsigned (dir_size, f_offset already are) and changing lseek error reporting (no longer treat negative as fail) - seems you can let SftSeek accept ANY dos_lseek retval as errors are already checked by SftSeek itself before calling dos_lseek? DosSeek just calls SftSeek, needs no changes. The sft_size / sft_posit change might require adjustments to that at some places in the code. - Any: (?) support that extended open flag which allows sizes above 2 GB: DosRWSft should throw error 5 access denied if you try to write beyond that file offset if that flag is not set (shrug ;-)) - Any: implement int 2f.1228?? Apparently exists but commented out?? Thanks for the explanation of OW 1.8 / 1280 get/setftime un- DOS-ification of headers to gain MS VC / DJGPP compat ;-). Eric -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] PATCH: sys fix
free time at last... On Wed, Apr 29, 2009 at 8:49 PM, Eric Auer e.a...@jpberlin.de wrote: Hi Bart, admins, others, Would you like to have access again? Should be no problem :-) Sure! Apparently only Aitor, Jim and Pat can give you SVN write access but I think that would be a *very* nice idea... ;-). I noticed Pat already uploaded your SYS OW 1.8 fix :-). :-) If you plan to patch things overlapping those things listed below, please announce so we can coordinate. You may also want Please consider the 2037 [dev] kernel for review only (not that I'm abandoning it, just moving my work outside of the scope of official FreeDOS kernel). to read the state of kernel 2037 and state of kernel 2038 threads on the freedos-user in Feb 2009. High on the wishlist will do, I have been trying to read through my archives, unfortunately my gmail account only goes back a year (search and access from multiple computers really is nice). for 2037 would be extending that SVN changelog wiki page and interesting read, but don't expect updates from me, for now at least a backport of country sys support to 2038 stable. Eduardo may be considering to work on that backport... =A0For SYS, I would suggest an option to enforce either LBA or CHS style boot, in I plan to work on porting the country (or ensuring Eduardo's patches are committed and tested) and win patches (the win specific parts are minimal) from dev to trunk after we get 2038 released (with the plan to release 2039 shortly after with these patches). sys work can wait for a little while questions though, are all the outstanding patches for country in the unstable branch or are there any emails/patches/whatever still floating out there? particular for FAT32, via the command line. The wishlist for the stable 2038 kernel is quite short: Insert patches listed below, update changelog file and make a SF file release :-). I'm working on the patches, been reading through and refamilarizing myself with the code, and think I can figure out the SF release process again, but those darn changelogs (ever so useful from the outside ...) Patches waiting here for review, comments, uploading: - *Bart*: SYS compileability with OpenWatcom C 1.8 and newer (in SVN) I need to check latest sys version and probably commit something similar as well, but that can wait until after 2038 is released - Eric: dosfns.c / fatfs.c / proto.h SHARE tuning (safe afair) - Christian: entry.asm revamp to fix the CP/M call (review!) http://sf.net/tracker/?func=3Ddetailaid=3D2421577group_id=3D5109atid= =3D105109 anyone know of any CP/M like programs or applications to test these with? - Any: (?) update changelog, update my email addr in the docs http://freedos.svn.sourceforge.net/viewvc/freedos/kernel/trunk/?view=3Dlo= g - RayeR: init-mod.h always say BSS_INIT(x)=3Dx (workaround OW bug?) I want to look into this one more, I know there is some interesting logic in startup because of the code relocation; need to verify what the entry code is doing - Tom: inthndlr.c bugfix for int 21.1c no-FAT case I don't remember seeing this one, will have to search for it - RayeR: initdisk.c CHS cyl off-by-one and total_sectors overflow =A0and DebugPrintf drive param format string fixes - Any: If DSSI points to partn (00 or 80) in FAT16/32 boot sector =A0then take partn offset from DSSI+x (I *had* a patch but where??) - Eric: re-enable drive access flag handling to make unformatted =A0drives more properly unformatted, disk tools should be fine now? - Christian: patch related to exit/resident if self-owned PSP =A0(he pasted the patch in a recent thread on the mailing list) - Any: (Eric?) support 4 GB file size by changing sft_size, sft_posit =A0to unsigned (dir_size, f_offset already are) and changing lseek =A0error reporting (no longer treat negative as fail) - seems you =A0can let SftSeek accept ANY dos_lseek retval as errors are already =A0checked by SftSeek itself before calling dos_lseek? DosSeek just =A0calls SftSeek, needs no changes. The sft_size / sft_posit change =A0might require adjustments to that at some places in the code. - Any: (?) support that extended open flag which allows sizes above =A02 GB: DosRWSft should throw error 5 access denied if you try to =A0write beyond that file offset if that flag is not set (shrug ;-)) all 2GB work should wait until 2038 and possibly 2039 are released, this should be done along with work towards FAT+ support (backword compatible with support for files 4GB, requires addition of one extended seek API function - see EDR for RBIL type spec and some internal changes to ensure sequential access works correctly) - Any: implement int 2f.1228?? Apparently exists but commented out?? will look into it, don't recall and too lazy while typing this email to see what this function does/is :-) Thanks for the explanation of OW 1.8 / 1280 get/setftime un- DOS-ification of headers to gain MS VC / DJGPP compat
Re: [Freedos-kernel] PATCH: sys fix
Hi Eric, 2009/4/25 Eric Auer e.a...@jpberlin.de: Would you like to have access again? Should be no problem :-) Sure! Question about the change in OpenWatcom headers which now apparently want 32 bit arguments for 16 bit values, which breaks not only SYS but also other DOS apps: - why did they do it? http://www.openwatcom.org/index.php/C_Compilers_Release_Changes * The date and time arguments to _dos_getftime() and _dos_setftime() are now using 'unsigned int' type instead of 'unsigned short'. This change has been made to improve compatibility with other compilers. * The segment argument used with _dos_allocmem(), _dos_freemem() and _dos_setblock() is now unsigned int instead of unsigned short. This change was made for compatibility with other compilers. So it's a good change because it makes OW compatible with MSVC, DJGPP etc. - when did they do it, what is version 1280? OW 1.8 - what are the hopes that they fix that regression? I don't think they will; it's deliberate. And sys only gets a warning, but the compilation breaks because it sets the compiler option err on warning. PS: Is the kernel compilation itself affected, too? No. Bart -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] PATCH: sys fix
Hi Bart, here's a patch to be able to compile SYS with OW 1.8. I've lost SVN commit access... Would you like to have access again? Should be no problem :-) +#if defined(__WATCOMC__) __WATCOMC__ 1280 unsigned short date, time; +#else + unsigned date, time; +#endif Question about the change in OpenWatcom headers which now apparently want 32 bit arguments for 16 bit values, which breaks not only SYS but also other DOS apps: - why did they do it? - when did they do it, what is version 1280? - what are the hopes that they fix that regression? Eric PS: Is the kernel compilation itself affected, too? -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
[Freedos-kernel] PATCH: sys fix
Hi, here's a patch to be able to compile SYS with OW 1.8. I've lost SVN commit access (sorry Jim for not responding to your email, I was very busy at the time), so I'm sending a patch in the hope somebody will apply it. Bart Index: sys/sys.c === --- sys/sys.c (revision 1366) +++ sys/sys.c (working copy) @@ -162,7 +162,11 @@ #else typedef struct { +#if defined(__WATCOMC__) __WATCOMC__ 1280 unsigned short date, time; +#else + unsigned date, time; +#endif } ftime; #endif @@ -1001,7 +1005,11 @@ struct stat fstatbuf; BYTE far *bufptr; BYTE far *buffer; +#if defined(__WATCOMC__) __WATCOMC__ 1280 UWORD theseg; +#else + unsigned theseg; +#endif strcpy(source, srcPath); if (rootPath != NULL) /* trick for comspec */ -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel