Re: [Freedos-kernel] Strange bug in kernel 2035

2004-07-26 Thread Eduardo Casino
Hello again, 2. nlsfunc would have to copy anything in between ss:sp and ss:920 (_disk_api_tos, that's the top of the stack used here in any DOS = 4.0) to a temp area (max 384 bytes), set sp to 920, and with that call DOS. Then after the call adjust the stack pointer, then swap

Re: [Freedos-kernel] Strange bug in kernel 2035

2004-07-26 Thread Bart Oldeman
On Mon, 26 Jul 2004, Eduardo Casino wrote: There are. If I understand it correctly, when calling DOS with ss:920, the flags and return address are trashed because DOS sets ss:920 on entry, again. No. The whole point of calling int2f/ax=12xx is that this stack setup is bypassed. i.e.

Re: [Freedos-kernel] Re: NLSFUNC and callbacks into kernal (was Re: [Freedos-kernel] Strange bug in kernel 2035)

2004-07-26 Thread Steffen Kaiser
On Tue, 27 Jul 2004, Bart Oldeman wrote: On Mon, 26 Jul 2004, Steffen Kaiser wrote: DOS has three internal stacks, how about switching to the Critical Error stack and defer any calls when the stack is in use? You'd automatically overflow into the Critical Error stack anyway. I So you can set DOS's

Re: [Freedos-kernel] Strange bug in kernel 2035

2004-07-26 Thread Eduardo Casino
El lun, 26-07-2004 a las 14:09, Bart Oldeman escribió: No. The whole point of calling int2f/ax=12xx is that this stack setup is bypassed. i.e. *without* any swapping in NLSFUNC you'd have int21/ah=38 = DOS switches to internal stack = NLSFUNC (still uses DOS stack) = int2f/ax=12xx = back

Re: [Freedos-kernel] Strange bug in kernel 2035

2004-07-24 Thread Arkady V.Belousov
Hi! 24--2004 14:37 [EMAIL PROTECTED] (Bart Oldeman) wrote to [EMAIL PROTECTED]: BO apart from the drawbacks there is another problem: BO mov bp, [bp + 20] ; store id (in SS:) unless it's NULL BO or bp, bp BO jz

Re: [Freedos-kernel] Strange bug in kernel 2035

2004-07-24 Thread Bart Oldeman
On Sat, 24 Jul 2004, Eduardo Casino wrote: El sáb, 24-07-2004 a las 13:50, Bart Oldeman escribió: It's a difficult question. Essentially there are two ways we can go: 1. if the kernel very carefully minimizes stack usage on the code path taken and NLSFUNC itself only uses a couple

Re: [Freedos-kernel] Strange bug in kernel 2035

2004-07-23 Thread Bart Oldeman
Hello Tom, apart from the drawbacks there is another problem: --- mov bp, [bp + 20] ; store id (in SS:) unless it's NULL or bp, bp jz nostore mov [bp], bx nostore: --- if (*id)