Dr John Stockton <spam@[EMAIL PROTECTED]
> wrote:
>It seems that none of those who have solved the problem have been
>willing to share it with us, or at least that the FAQ maintainer of the
>time never noticed, or felt that the TurboPower site would suffice.
>
>AIUI, like Borland Crt, TPCrt does various things. In particular, it
And OpCrt (former TPCrt) does it better than Crt.
I wrote a fix in 2002 in this group:
W.Riedel <Riedel@[EMAIL PROTECTED]
> wrote 2-Apr-2002, 15:13
[...]
======================================
The OPCrt.TPU (ex TPCrt) has a similar problem as
the Crt.tpu but at higher clock speeds.
If you have the sources as usual from TurboPower
you should modify
OPCRT.asm
assemble it and link the OPCrt.OBJ to the
re-compiled OPCrt.pas.
OPCRT.asm needs OPCOMMON.asm to assembly OPCRT.obj
OPCRT.pas needs OPCRT.obj, OPCRT2.obj
only OPCRT.asm/.obj is changed !
The Procedure <DelayMS> makes the error at initialization:
----------------------------------------------------
DelayMS PROC NEAR
; additional delay by a sub-loop
MOV BX, 4 ; 4 == original, o.k. for Pentium III/550
; <4> must be increased to e.g. 20
DMSdec: DEC BX
JNZ DMSdec ; inner loop, 4 times, too short
CMP AL,ES:[DI] ; The System Clock's lowest byte, 55 msec
LOOPE DelayMS ; loop_E_ exits with CX > 0 at slow CPUs ..
;.. due to CMP with timer value, 55 ms ..
RET ;.. before, but with LOOP_-exit {CX==0} at
;.. fast CPUs
DelayMS ENDP
----------------------------------------------------
;// I have re-defined DelaMS_TC = 20
DelaMS_TC = 20 ;// 20 for Security until 30 GHz CPUs
DelayMS PROC NEAR
;///// MOV BX, 4 ;// old, replaced by ..
MOV BX, DelaMS_TC ;// new !
DMSdec: DEC BX
...
...
DelayMS ENDP
----------------------------------------------------
Some results:
<DelaMS_TC> = 4 o.k. @[EMAIL PROTECTED]
PIII/550, wrong @[EMAIL PROTECTED]
Duron 800 MHz
<DelaMS_TC> = 5 still wrong @[EMAIL PROTECTED]
Duron 800 MHz
<DelaMS_TC> = 6 just o.k. @[EMAIL PROTECTED]
Duron 800 MHz
<DelaMS_TC> = 20 ; chosen here for ca. 30 GHz CPUs :-)
W.Riedel


|