BP uncompatible with Pentiums? 
Author Message
 BP uncompatible with Pentiums?

Hi

On my Pentium 90 when I set the compiler option to N+ (8087 on)
BP would behave really weird.   In real mode a floating point
error (such as 200 - divide by 0, or 207) cannot be located,
while in protected mode the computer would crash out of the BP
environment and become unstable - will have to reboot.  Is this
peculiar to Pentiums?  N+ mode is of course necessary for
types double and extended so this is rather limiting!

Try this:

{$N+}
var
  x,y: real;
begin
  x := 0;
  y := 1/x;
end.

Tuan Pham  



Wed, 18 Jun 1902 08:00:00 GMT  
 BP uncompatible with Pentiums?

Quote:

>On my Pentium 90 when I set the compiler option to N+ (8087 on)
>BP would behave really weird.   In real mode a floating point
>error (such as 200 - divide by 0, or 207) cannot be located,
>while in protected mode the computer would crash out of the BP
>environment and become unstable - will have to reboot.  Is this
>peculiar to Pentiums?  N+ mode is of course necessary for
>types double and extended so this is rather limiting!

I don't think it's limited to Pentiums:  BP always has trouble
locating floating point errors, and the pmode environment is flaky at
handling hardware interrupts.

The reason for the former problem is that there's a bug in the IDE
that means it can't locate an address when the segment is specified
incorrectly.  (The coprocessor reports a linear address, so the crash
address you see has a faked segment value.)  The command line compiler
doesn't have this bug; it can often find errors that the IDE can't, by
using something like

  bpc myprog /Fssss:oooo

Pretty frequently even this doesn't work, because the error happens
somewhere in the RTL where you've got no debugging info.  There's not
much help for this.

BTW, occasionally my ERR87_13.zip package (available on
garbo.uwasa.fi) can help in interpreting coprocessor errors.

Quote:
>{$N+}
>var
>  x,y: real;
>begin
>  x := 0;
>  y := 1/x;
>end.

It isn't a good idea to use the Real type in $N+ mode:  it's much
slower than Single or Double, and occasionally leads to unnecessary
stack overflows.  BTW, BP on my 486DX couldn't find the error in that
program either, but BPC could.

Duncan Murdoch



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. bp 5.5 vs bp 6.0

2. BP 7.0 and BP 7.1

3. Difference between BP 7.0 / BP 7.1 ?

4. Translation of OWL for BP 7.0 to 32 bit

5. question: BP pointer NEW

6. Multitasking under BP protected mode

7. TP/BP-7 Edit Keys

8. BP 7.0 problems.

9. Windows 2000 / BP 7.0

10. TCP/IP and sockets for BP.

11. BP 7.01

12. BP and TP under Windows XP

 

 
Powered by phpBB® Forum Software