On Mon, 1 Mar 2004, Arkady V.Belousov wrote:

> BO> In the current sys it simply happens to work since the int 25/26 is
> BO> followed by "mov sp, bp".
>
> - BP itself should be preserved somewhere (because "modify[]"). Where if not
>   on stack?

that's a question for me as well. It just happens to be preserved by the
FreeDOS kernel for int 25/26.

> - I not (yet) compile kernel by Watcom (so don't know, how WCC compiles this
>   code), but in excerpt there are no "mov sp,bp" after compilation.

Looking at sys.obj disassembly:

043F    CD 26                     int       0x00000026
0441    19 C0                     sbb       ax,ax
0443    3D FF FF                  cmp       ax,0xffff
0446    75 16                     jne       L$46
0448                          L$45:
0448    8B 56 F4                  mov       dx,-0xc[bp]
044B    42                        inc       dx
044C    8B 76 0A                  mov       si,0xa[bp]
044F    8D 5E F6                  lea       bx,-0xa[bp]
0452    B8 05 73                  mov       ax,0x7305
0455    B9 FF FF                  mov       cx,0xffff
0458    CD 21                     int       0x00000021
045A    19 C0                     sbb       ax,ax
045C    EB 02                     jmp       L$47
045E                          L$46:
045E    31 C0                     xor       ax,ax
0460                          L$47:
0460    89 EC                     mov       sp,bp   <---
0462    5D                        pop       bp
0463    5F                        pop       di
0464    5E                        pop       si
0465    C2 04 00                  ret       0x00000004

> BO> Strange that in your example the pragma doesn't seem to preserve bp
> BO> however ... FreeDOS preserves it, don't no about others..
>
>      "FreeDOS"?

the Freedos kernel preserves the "bp" register for int25 and int26.

> BO> I don't think dx=ffff is a problem for floppies / <32MB for any DOS >= 3.31.
>
>      Bug in RBIL?

don't know ... RBIL is only sufficient in this case -- it simply tells us
that it works for "32M-2047M hard-disk partition" but tells nothing about
the behaviour outside these ranges (only about FAT32).

Bart



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to