tp7.0 & pentium II 
Author Message
 tp7.0 & pentium II

i recently upgraded my system to a pentium II system and somehow i can't
run any of my old programs compiled in turbo Pascal 7.0 and i can't even
compile anything in pascal anymore... just before the program is about
to actually start running, the system will return 'divide by zero
error'. this happens no matter what the code i'm trying to run is so
long as i include any units. even stupidly simple code like:

program blah;
uses crt;
begin
end.

will return a divide by zero error. this isnt' the normal divide by zero
error you normally receive when your program actually *does* divide by
zero. instead, a dialog box pops out instead of just the simple line on
top of the screen... does anyone have any idea why this is happening? i
tried changing the compiler options but nothing seems to help. i'm thing
it's probably got something to do with my new hardware since this never
happened on my old computer but i have no idea what.

my system is a pII/266, intel pd440fx motherboard, 64mb edo ram, matrox
mystique, sb vibra 16 sound card... dunno if any of that might be the
fault.

if anyone has any idea what's wrong or knows if i happen to be doing
something stupid that's bringing about this problem mail me okay? really
need help desperately. thanks!

smiLe!

steven :)



Wed, 18 Jun 1902 08:00:00 GMT  
 tp7.0 & pentium II

Hm.  I have a dual PII system and all my C programs work.  But I've seen this before with games.  It's the code your
compiler is generating.  There may be some options in the code generation section you can mess with or go to borlands
site.

: i recently upgraded my system to a pentium II system and somehow i can't
: run any of my old programs compiled in turbo pascal 7.0 and i can't even
: compile anything in pascal anymore... just before the program is about
: to actually start running, the system will return 'divide by zero
: error'. this happens no matter what the code i'm trying to run is so
: long as i include any units. even stupidly simple code like:
:
: program blah;
: uses crt;
: begin
: end.
:
: will return a divide by zero error. this isnt' the normal divide by zero
: error you normally receive when your program actually *does* divide by
: zero. instead, a dialog box pops out instead of just the simple line on
: top of the screen... does anyone have any idea why this is happening? i
: tried changing the compiler options but nothing seems to help. i'm thing
: it's probably got something to do with my new hardware since this never
: happened on my old computer but i have no idea what.
:
: my system is a pII/266, intel pd440fx motherboard, 64mb edo ram, matrox
: mystique, sb vibra 16 sound card... dunno if any of that might be the
: fault.
:
: if anyone has any idea what's wrong or knows if i happen to be doing
: something stupid that's bringing about this problem mail me okay? really
: need help desperately. thanks!
:
: smiLe!
:
: steven :)
:



Wed, 18 Jun 1902 08:00:00 GMT  
 tp7.0 & pentium II

Hi!

This is a bug in the crt unit. Take a look at:
http://www.mi.uni-erlangen.de/~heckenb/programs.htm#NewDelay

Regards
Bo Johansson



Quote:
> i recently upgraded my system to a pentium II system and somehow i can't
> run any of my old programs compiled in turbo pascal 7.0 and i can't even
> compile anything in pascal anymore... just before the program is about
> to actually start running, the system will return 'divide by zero
> error'. this happens no matter what the code i'm trying to run is so
> long as i include any units. even stupidly simple code like:

> program blah;
> uses crt;
> begin
> end.



Wed, 18 Jun 1902 08:00:00 GMT  
 tp7.0 & pentium II

Quote:

>Hm.  I have a dual PII system and all my C programs work.  But I've seen this
> before with games.  It's the code your
>compiler is generating.  There may be some options in the code generation
> section you can mess with or go to borlands
>site.

I can't tell you much about it, but there has been much discussion about this



Wed, 18 Jun 1902 08:00:00 GMT  
 tp7.0 & pentium II

Quote:

> : i recently upgraded my system to a pentium II system and somehow i
> can't
> : run any of my old programs compiled in turbo pascal 7.0 and i can't
> even
> : compile anything in pascal anymore... just before the program is
> about
> : to actually start running, the system will return 'divide by zero
> : error'. this happens no matter what the code i'm trying to run is so

> : long as i include any units. even stupidly simple code like:

The problem is that Borland did not use the INT15 Routine for Delays but
they made their own one. But you do not have to use the 'delay' Command
to provoke this error.
The main problem is that this delay-routine is nothing but a For x:= 1
to y...do-loop (hehe just like ol' times). When the CRT-Unit is
initialized there is started a routine that measures the y between two
timer-ticks (55 ms).
Now the CPU is so fast that there is a Overflow (y gets too big) This
Overflow error shares the Error-Interrupt with the
Division-by-Zero-Error which is Runtime Error 200.
You have to patch the CRT-Unit or the compiled program:
Search for

F7D0 NOT AX
F7D2 NOT DX
B93700 MOV CX,37h
F7F1 DIV CX

Change the 37h to 7Eh.
There must be somewhere a patched CRT Unit at http://www.heise.de/ct/
but I didn't find it.



Wed, 18 Jun 1902 08:00:00 GMT  
 tp7.0 & pentium II

Quote:

> : i recently upgraded my system to a pentium II system and somehow i
> can't
> : run any of my old programs compiled in turbo pascal 7.0 and i can't
> even
> : compile anything in pascal anymore... just before the program is
> about
> : to actually start running, the system will return 'divide by zero
> : error'. this happens no matter what the code i'm trying to run is so

> : long as i include any units. even stupidly simple code like:

The problem is that Borland did not use the INT15 Routine for Delays but
they made their own one. But you do not have to use the 'delay' Command
to provoke this error.
The main problem is that this delay-routine is nothing but a For x:= 1
to y...do-loop (hehe just like ol' times). When the CRT-Unit is
initialized there is started a routine that measures the y between two
timer-ticks (55 ms).
Now the CPU is so fast that there is a Overflow (y gets too big) This
Overflow error shares the Error-Interrupt with the
Division-by-Zero-Error which is Runtime Error 200.
You have to patch the CRT-Unit or the compiled program:
Search for

F7D0 NOT AX
F7D2 NOT DX
B93700 MOV CX,37h
F7F1 DIV CX

Change the 37h to 7Eh.
There must be somewhere a patched CRT Unit at http://www.heise.de/ct/
but I didn't find it.



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

 Relevant Pages 

1. Executing TP7 programs over a PENTIUM II

2. TP7 progs don't work on my Pentium-II

3. Pentium II & BP 7.0

4. borland pascal programs don't run with intel pentium II

5. Borland Pascal 7 CRT unit on Pentium II

6. Pentium II Problem with BP7.0?

7. Parche para T. Pascal en Pentium II y superiores

8. BP 7 programs don't run with a Pentium II 400

9. Why don′t run Pascal 7.0 in Pentium II

10. Pentium II Celeron will not run code

11. Pascal patch needed for pentium II

12. Pentium II problem with programs compiled in Turbo Pascal (CRT unit)

 

 
Powered by phpBB® Forum Software