VOGONS

Common searches


First post, by dobiz

User metadata
Rank Newbie
Rank
Newbie

Hi:

I use Dosbox 0.73 to run old scientific software once developed under Borland Pascal (BP7) for MS-Dos. By the way, thanks a lot to the developers of DosBox!

I came recently across a problem related to the use of FPU (Floating Point Unit 8087/80287) simultaneously with DPMI (Protected mode). I can run my program only 3 times, and the 4th time it crashes with a divide by zero.
Then I have quit DosBox and to rerun it, which allows me to run my program 3 times again!

I could simulate the same error with the following 4-lines program:
{$N+,E-}
begin
WriteLn(1.:1:0);
end.
This program works fine three times (screen output is "1"), and then bugs (screen output "0").
The problem does not appear if compiled in real mode. It does not appear either if compiled without FPU (i.e. with option $N-).

Thanks

Reply 3 of 7, by dobiz

User metadata
Rank Newbie
Rank
Newbie

@h-a-l-9000: Sorry, I'm not a forum geek and I'm not sure to understand what you suggest. Could you elaborate a little bit? Thanks.

@ripsaw8080: I did not know the core parameter. I had core=auto in my conf file. I just tried dynamic, normal, and simple. The bug appears only with dynamic and auto.

Reply 5 of 7, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

dobiz - could you upload a compiled EXE of that 4-line program here?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 6 of 7, by dobiz

User metadata
Rank Newbie
Rank
Newbie

@h-a-l-9000: My OS are Vista and XP

@MiniMax: Attached the exe of my 4 lines program

Attachments

  • Filename
    FPUBUG.EXE
    File size
    11.41 KiB
    Downloads
    176 downloads
    File license
    Fair use/fair dealing exception