From: Jim M. <jmi...@ya...> - 2011-02-15 22:27:00
|
by size you mean the size of the structure? ouch... the size of the structure is exactly 0x2c including the reserved stuff. if you don't include the reserved stuff, it's 0x24. the first operation should be a calloc to allocate the structure, which zeros the structure memory first before the call, and zero the flags (which includes CF). with djgpp, they additionally instruct you to zero sp, and ss, so that go32 will automatically alloc a stack (lest you end up with garbage). with the thinking that if the OS doesn't support this function whatsoever and totally blows it, you will get a zero back your original stuff, and of course the zeroing of the structure leaves you with the size member coming back with what? zero. thus it is less than 0x24 (the size of the structure minus the reserved area) and thus an error. and of course of it is greater than 0x2c (the size of the structure including the reserved space), it is suspect as well. good catch. I set CF to 0 before I started, and I got 0 when I ended. windows xp. xp totally blew the function call. I set the entire structure to 0's before I started, and I got 0's back. but then again that's windows xp. it would be interesting to see what happens on other OS's... now I need a guinea pig freedos FAT32 machine to test my df program on... ________________________________ From: dos386 <do...@gm...> To: fre...@li... Sent: Mon, February 14, 2011 12:08:20 AM Subject: Re: [Freedos-devel] documentation for FreeDOS filesystem or other programming functions/interfaces? > RBIL is pretty much it (right? > http://www.delorie.com/djgpp/doc/rbinter/id/40/32.htm NO, see above. > I am hoping to implement some sort of fallback mechanism into the program > so that if int 21h, 7303h fails, I have int 21h, 36h to fall back on > but I need to know exactly how to detect failure See above: clear buffer, set "size" to $30, set flag(C) to 1, call INT $21 / AX=$7303, if ((flag(C)=1) or ("size" < $24) or ("size">$2C)) then /* F**K, do fallback to AH=$36 */ ... -- ~~~ wow ~~~ ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Freedos-devel mailing list Fre...@li... https://lists.sourceforge.net/lists/listinfo/freedos-devel |