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

2004-02-14 Thread Luchezar Georgiev
Here are my latest news. If I compile ALL the kernel for 80186, and ONLY the fmemcpy function in main.c for 80386 (using #pragma option -3 and -1, all the other functions in main.c are compiled for 80186 too), it crashes! I tried all other possible combinations, and it turned out that it doesn't depend on whether ANY other file or ANY other function in main.c is compiled for 80186 or 80386. It only depends on what CPU fmemcpy in main.c is compiled for. If it's compiled for 80386, it crashes. If it's compiled for 80186, it doesn't. So I'll now try to implement Bart's idea of using ASMSUPT.ASM in the INIT code. I believe that this will solve the problem once and forever.

Lucho

P.S. It seems that I'm in the black list of SourceForce, but only for the kernel mailing list, as I receive only half of the articles there. The other mailing lists work well. I'll keep trying...

---
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