Re: [Freedos-kernel] Borland C 386 bug

2004-02-12 Thread Luchezar Georgiev
On Thu, 12 Feb 2004 13:34:33 +0300 (MSK), Arkady V.Belousov wrote:

Unfortunately, I don't know, how to turn return target processor option
back - target may be 386, but it may be also 8086. Probably, next (after
fmemcpy() definition) should work:
#ifdef __BORLANDC__
# pragma option -3.
#endif
Yes, it does work, but this is even worse than my workaround.

Lucho

---
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=1356alloc_id=3438op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: Borland C 386 bug

2004-02-12 Thread tom ehlert
Hello Luchezar,

LG Maybe later I could try it too... but first I must learn
LG Bochs!

try
DEVICE=C:\NUMEGA\S-ICE.EXE /TRA 30 /SYM 400
DEVICE=C:\system\himem.sys /TESTMEM:OFF
DEVICE=C:\NUMEGA\umb.sys
...
installhigh=

UMB.SYS is the s-ice UMB provider, and should work similar to emm386

LG All this just for a tiny refused patch?!
No. but the problem lies somewhere else.
fmemcpy() uses EAX in a very correct way, and the compiler will issue
some
mov EAX,4[bp]

whenever it finds appropriate.
somewhere else, sooner or later, where it will again cause trouble.

thus the proplem is just delayed, not solved.


tom




---
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=1356alloc_id=3438op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: Borland C 386 bug

2004-02-12 Thread Luchezar Georgiev
On Thu, 12 Feb 2004 16:41:58 + (GMT), Bart Oldeman wrote:

yes, please send me a minimal failing kernel + mapfile + minimal
config.sys and the command you're installing high (which should also be as
small as possible and open source).
Please leave kernel.sys *uncompressed*. This is very important as it
greatly simplifies debugging for me (setting break points in startup
code with DOSEMU without needing explicit int3's + recompilation).
Thank you - just sent you a private message with the requested files, and will now reply to yours.

The minimal FDCONFIG.SYS with which it fails is:

DOS=HIGH,UMB
DEVICE=D:\NU-MEGA\S-ICE.EXE /TRA 300 /SYM 40
DEVICE=C:\DOS\HIMEM64.EXE /VERBOSE
DEVICE=D:\NU-MEGA\UMB.SYS
INSTALL=C:\DOS\CTMOUSE.EXE
Of course, you may want to remove the SoftICE line and use a different UMB manager. I normally use UMBPCI, but it won't work in a virtual environment. The INSTALLed command doesn't matter - I tried CTMOUSE.EXE but any other installed command causes the same invalid instruction fault. Note that although the command is INSTALL and not INSTALLHIGH, CTMOUSE still allocates itself in an UMB!

At the time of the invalid instruction, SoftICE showed me different things depending on whether the kernel was compressed or not. For the compressed kernel, the register dump was this:

EAX=997D9900 EBX=BCD0 ECX=0 EDX=643 SP=6410 EBP=50 ESI=E2 EDI=99BD
FS=0 GS=0 DS=433F ES=6 SS=99BD CS=99BD IP=BCD0 FLAGS=odIszaPCt
99BD:BCD0   INVALID
For the uncompressed kernel I sent you, the register dump was this:

EAX=997D0045 EBX=0 ECX=4330 EDX=0 SP=6414 EBP=6412 ESI=6423 EDI=6422
FS=0 GS=0 DS=997D ES=D1 SS=997D CS=997D IP=2077 FLAGS=odISzaPCt
997D:2077 637E0D  ARPL [BP+0D],DI  SS:641F=6567
Note some interesting things. The high word of EAX=DS=SS=CS in the second case and pretty close to it in the first case. EDI=SS=CS and EBX=IP in the first case. High word of EAX is always 997D.

I press F8 at kernel start-up and press Y two times. When SoftICE starts, I enter it and set bpr 0:0 a000:0 t, then press F5 to go. Then I press Y another two times and when CTMOUSE starts, digits 2323 or 23 are shown on the screen on a new line, and then the fault occurs. SoftICE pops up and shows the resister dumps above. But when I do show 1, it shows only the last instruction repeated endlessly. What am I doing wrong? I'm a newbie in SoftICE, that's why I ask.

Lucho

---
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=1356alloc_id=3438op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel