Hi Kevin, > On Sun, Apr 06, 2008 at 01:34:11PM +0200, Tom Ehlert wrote: > > a) freedos *always* calls int13 on the block device stack > > with stack bottom > > DOS DS:aa0 > > and top DOS DS:ee2 (384 byte); DOS DS is usually 0x00D0 or 0x00d1 > > I don't understand: 0xee2 - 0xaa0 is 1090 bytes.
More complete: there are several stacks involved; this is from kernel.map where 0074 becomes relocated 00d4: 0074:0620* apistk_bottom 0074:07a0 _error_tos 0074:0920 _disk_api_tos 0074:0aa0 _char_api_tos 0074:0ed6 blk_stk_top 0074:0f56 clk_stk_top 0620-07a0 (384 bytes) error stack (for abort, retry, ignore prompts) 07a0-0920 (384 bytes) DISK API stack (used by DOS functions ah=0 and 0dh and higher) 0920-0aa0 (384 bytes) Character API stack (used by DOS functions: ah=01 to 0ch) 0aa0-0ab0 ( 16 bytes) Misc variables from assembly code. 0ab0-0cb0 (512 bytes) DiskTransferBuffer used by block driver. 0cb0-0d56 (166 bytes) Misc variables from C code such as low fnodes. 0d56-0ed6 (384 bytes) Disk (block) driver stack (calls int 13h) 0ed6-0f56 (192 bytes) Clock driver stack (used by CLOCK$ driver) The first three stacks are fixed, they have to be there with that size for compatibility reasons. I'm not sure if other DOSes uses a clock or block stack. They may even leave less stack space for the BIOS -- although FreeDOS, using C, probably uses more space in the first three, so needing the extra stacks for the drivers. > The general feedback I'm getting is that 236 bytes of stack space > should be sufficient for a bios call (and any ISRs). I can make this > work today, but adding new features (eg, support for hard drives over > 2 TB) is becoming difficult. > > I don't want to drop support for freedos. One option is to have the > bios use its own stack - but that raises new questions - where to put > it and does the bios have to handle recursive calls. I'll send a > separate email. You could use the EBDA to store various (non-reentrant) things I think. Bart ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel