Hi James,

    Thanks for the fpu testing. I think I fixed the bugs in the 
decoding routine. I also found a bug in the Intel manual opcodes.
They have fstp st(i) wrong !
I cannot test the fput stuff at the moment because I don't have a 
co-processor yet. I only have a 386. I wrote the pfloat.asm in real
mode and used a 387 emulator. I couldn't test it when I implemented 
it in the debugger. So I was hopping you could see/fix the problems.
I have included the origonal real mode version of print_float for
you to see that it works ok. see realmode.zip

BTW do you like the jump line pointer feature I did ?

see debug.asm source for other updates I have made.

I have also made many improvments to DOS32. I have included a copy of the 
latest versions. At this point I don't know of any bugs so If you
find any can you please report them.
The main change is a zero based program segment. Thus offset will always 
equal linear address. e.g  mov  ds:[0a0000h],al will accesss video memory.
You'll see this in debug when viewing the segment base with CTRL key. 
This means only the DOS32 version in dlink will work with the new linker.
so you must use the -S switch when linking anything using the new linker.


I also changed all the 16bit addressings in example.asm to 32bit as
any 16bit addressing cannot be used in flat memory. DLINK now errors
on any 16bit segment relative fixups so its impossible to create
programs with 16bit addressing anyway.


Adam





known remaining bugs:
1. x87 decoding still has bugs.
   See them in example.asm, denoted by ;???
   Since I don't have access to x87 opcodes, and I honestly don't understand
   the decoding process, I leave them to you...

2. The original print_float caused page-fault.
   this was because TERMINATING_CHAR was moved to ah, not al (before stosb).
   After I corrected this, the page fault disappears, but the routine does not
   seem to print the correct number.

   I've included an alternative print_float with similar accuracy (17-digits).
   It uses the simple idea of taking the log, get the exponent, replace the
   exponent with 16, then do the antilog. In the end, you got a 17-digit
   integer which can be fbstp-ed & printed.
   You could try to use exponent 17 which after the antilog will result in
   18-digit integer (max capacity of bcd), but the accuracy is not good...
   80.8 will show as 80.799999999999999.

   It does not have any fancy formatting algorithm as in the original
   print_float. 




