Board index » delphi » Pentium pro and BP 7

Pentium pro and BP 7

Hi,

Has anyone experience with running BP7 protected mode programs on a
Pentium Pro 200. Today I discovered that my program doesn't run on a
Pentium Pro. I get a division by zero runtime error in the CRT unit.

Anyone experienced this also ?

Thanks Franc.

 

Re:Pentium pro and BP 7


Franc v/d Westelaken (pla...@ib.com) wrote:
: Hi,
:
: Has anyone experience with running BP7 protected mode programs on a
: Pentium Pro 200. Today I discovered that my program doesn't run on a
: Pentium Pro. I get a division by zero runtime error in the CRT unit.
:
: Anyone experienced this also ?
:
: Thanks Franc.
:

  Hello,

I think you may have used the Delay procedure... Am I right? It is buggy,
and on very fast machines it causes errors... You may find several fixes for
this problem on the net, but I can't remember exactly... If you don't need
millisecond accuracy, it is easy to write one for yourself. You could use the
BIOS timer tick variable (located at $40:6C, and accessable using a pointer
or the MemL array) to wait the specified time. That variable increases by
one in every 1/18th of a second.

                        Best regards,

--

                                Balazs Scheidler

*-------------------------------------------------------------------------*
| Author of Turbo Vision Resource WorkShop, the ultimate resource toolkit |
| for Turbo Vision for Pascal and C++. You can get the latest version at  |
| ftp://tolna.hungary.net/pub/tvrw/tvrw33d.zip                            |
| ftp://simtel.net/pub/simtelnet/msdos/turbovis/tvrw33d.zip               |
*--------------------------------------------*bAzSi*----------------------*

Re:Pentium pro and BP 7


pla...@ib.com (Franc v/d Westelaken) writes:

Quote
>Hi,
>Has anyone experience with running BP7 protected mode programs on a
>Pentium Pro 200. Today I discovered that my program doesn't run on a
>Pentium Pro. I get a division by zero runtime error in the CRT unit.
>Anyone experienced this also ?

Actually quite a few people did, as you can see from the many postings
in the last few weeks. My patch is at:

http://www.mi.uni-erlangen.de/~heckenb/programs.htm#NewDelay

Hope this helps,
Frank

Re:Pentium pro and BP 7


In article <57jltn$...@da.bausch.nl> of Thu, 28 Nov 1996 09:27:00 in
comp.lang.pascal.borland, Franc v/d Westelaken <pla...@ib.com> wrote:

Quote
>Hi,

>Has anyone experience with running BP7 protected mode programs on a
>Pentium Pro 200. Today I discovered that my program doesn't run on a
>Pentium Pro. I get a division by zero runtime error in the CRT unit.

>Anyone experienced this also ?

Yes.

Timo, how about a reference to Frank Heckenbach's stuff in the next
TSFAQP? I think that your present version only mentions the "old" Delay
problem.

From pascal.htm (which I think is about right) at the URL below :

<A NAME="Delay"> <H4>Bugs in the Crt.Delay procedure</H4> </A>

The standard Crt.Delay procedure uses a count-loop calibrated during
program startup, employing the 18.2Hz clock to give a standard interval,
and using the same loop with this calibration when Delay is running.

<p> Programs compiled with older versions of TP (... TP5, TP6) would
miscalibrate when  this counter of type WORD, overflowed during startup
- AFAIR, this occurred with a 486DX33, but not with a 286-12.
I've heard that "the limit was about 486/25 or perhaps 386/40 with
cache".  There was a TP6 patch; TP7 & BP7 are OK.

<p> I gather that a related problem may occur with a PP-200 using later
software.  Hans Schleichert (hans.schleich...@uni-tuebingen.de) wrote:
"When you try to run a program written in Turbo Pascal on a CPU running
at 200MHz or more, and the program uses the Crt unit, it will crash
before in executes the first main program line and will report a divide
by zero error."

Quote
<p>Frank Heckenbach (fkhec...@cip.informatik.uni-erlangen.de) wrote:

"That's correct, though the error message isn't quite accurate. There is
in fact no division by 0, but a division of a large number by 55 whose
result won't fit into a 16 bit register. But the CPU generates the same
'divide by zero' exception/interrupt for that."

<p> His
<A HREF="http://www.mi.uni-erlangen.de/~heckenb/programs.htm#NewDelay">
NewDelay</A> patch is now available.  He says now (96/11/18) :
I updated the patch for the bug in the Delay procedure of
the unit Crt. The patch now works for TP 6.0 as well as
TP/BP 7.00/7.01. It can patch Crt at runtime, so you can
use it even if you don't have the source code of Crt.

<p> Another solution seems to me to be to write one's own Delay routine
in Pascal, along the same (or different) lines but with a longer
counter.

<p> Further discussions of timing and delays can be found in Prof.
Salmi's TurboPascal FAQ, in Kris Heidenstrom's Timing FAQ, and in the
newsgroup comp.lang.pascal.borland.  Try a DejaNews search on "Frank
Heckenbach".

--
John Stockton, Surrey, UK.  J...@merlyn.demon.co.uk  Turnpike v1.12  MIME
    http://www.merlyn.demon.co.uk/

Re:Pentium pro and BP 7


In article <PHUVKHATmrnyE...@merlyn.demon.co.uk>,
Dr John Stockton  <j...@merlyn.demon.co.uk> wrote:
:In article <57jltn$...@da.bausch.nl> of Thu, 28 Nov 1996 09:27:00 in
:comp.lang.pascal.borland, Franc v/d Westelaken <pla...@ib.com> wrote:
:>Has anyone experience with running BP7 protected mode programs on a
:>Pentium Pro 200. Today I discovered that my program doesn't run on a

:Timo, how about a reference to Frank Heckenbach's stuff in the next
:TSFAQP? I think that your present version only mentions the "old" Delay
:problem.

It is a good suggestion, as always from you, my good net friend
John. There is a problem however. The problem is that at some point
I have to draw the line how far I can go in the FAQ with pointers to
outside material. Especially in cases where I am unable to try out
the solutions myself (I do not have a P-pro 200 :-). What I'll do at
this juncture is to make a general reference of the possibility of
strife with some other processors than listed in the FAQ.

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi archives  193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi  <URL:http://uwasa.fi/~ts>  ; FIN-65101,  Finland

Re:Pentium pro and BP 7


pla...@ib.com (Franc v/d Westelaken) wrote:

Quote
>Hi,

>Has anyone experience with running BP7 protected mode programs on a
>Pentium Pro 200. Today I discovered that my program doesn't run on a
>Pentium Pro. I get a division by zero runtime error in the CRT unit.

>Anyone experienced this also ?

>Thanks Franc.

Hello!

Take a look at http://www.merlyn.demon.co.uk/pascal.htm

/Bo

Re:Pentium pro and BP 7


pla...@ib.com (Franc v/d Westelaken) wrote:

Quote
>Hi,
>Has anyone experience with running BP7 protected mode programs on a
>Pentium Pro 200. Today I discovered that my program doesn't run on a
>Pentium Pro. I get a division by zero runtime error in the CRT unit.
>Anyone experienced this also ?
>Thanks Franc.

Sounds like maybe a timing problem... During speed-adjustment for
delay() I guess.
Squirrel {*word*97} Information Page
http://www.people.memphis.edu/~uglmiller/home.htm

Re:Pentium pro and BP 7


Quote
> Hello!

> Take a look at http://www.merlyn.demon.co.uk/pascal.htm

> /Bo

Is it true that BP7 programs don't run on Pentium Pro CPU's?

Your server generates quite an interesting error mesage:

400 Bad Request
Your request '' has bad syntax or is inherently impossible to satisfy.
------------------------------------------------------------------------
thttpd/1.00.dis++
HTTP/1.0 400 Cache Detected Error Server: squid/1.0.20 Date: Monday,
16-Dec-96 04:15:44 GMT Expires: Monday, 16-Dec-96 04:20:44 GMT
Last-Modified: Monday, 16-Dec-96 04:15:44 GMT Content-Type: text/html
Content-Length: 655
ERROR
The requested URL could not be retrieved
------------------------------------------------------------------------
While trying to retrieve the URL: http://www.merlyn.demon.co.uk/pascal.htm
The following error was encountered:
?Read Error
The system returned:
 (131) Connection reset by peer
This means that:
    The remote site or network may be down.  Please try again.
-----------------------------------------------------------------------
Generated by squid/1.0...@www.homepages.demon.co.uk

Re:Pentium pro and BP 7


Quote
"Tobin Fricke" <to...@mail.edm.net> writes:
>> Take a look at http://www.merlyn.demon.co.uk/pascal.htm
>Is it true that BP7 programs don't run on Pentium Pro CPU's?

Not actually. Programs that use Crt will produce a runtime error
during initialization, but my patch will fix it. It's at
http://www.mi.uni-erlangen.de/~heckenb/programs.htm#NewDelay
and it's also linked from John's page (see above).

Quote
>Your server generates quite an interesting error mesage:
>400 Bad Request
>Your request '' has bad syntax or is inherently impossible to satisfy.
>[...]

How many times did you try? You know, nobody is perfect, neither the net.
Before posting about it, you should always try another day...
I just reached the URL fine.

Hope this helps,
Frank

Other Threads