Board index » delphi » >200 MHZ, 200 error continued ...

>200 MHZ, 200 error continued ...

I've had the problem and corrected it in the CRT unit. It's worked fine on a
200 machine, but on a 300 machine the problem has returned. I've removed all
the delay-code and initialisation code around Delay, but the problem doesn't
go away.

Has anyone out there experienced the same, is there another bug in the
runtime-library, that has anything with machine-speed to do, please anyone.
The truth is in here (i hope) ?

Jens Kristensen, Denmark

 

Re:>200 MHZ, 200 error continued ...


In article <6rk31d$e3...@dalen.get2net.dk>,

Quote
Jens Kristensen <s...@post1.tele.dk> wrote:
>I've had the problem and corrected it in the CRT unit. It's worked fine on a
>200 machine, but on a 300 machine the problem has returned. I've removed all
>the delay-code and initialisation code around Delay, but the problem doesn't
>go away.

If you fix it correctly it does not reappear. Do not arbitrarily remove
code. Instead fix the problem:

CRT.ASM

DelayCnt        DW      ?
DelayCntHi      dw      ?     ; added for delay bug fix
...

        MOV     CX,55

        ; begin added code for delay bug fix

        push    ax              ; save ax for the second division
        mov     ax,dx
        xor     dx,dx           ; dx:ax := 0:dx
        div     cx              ; ax:=orig dx / 55, dx:=orig dx mod 55
        mov     DelayCntHi,ax   ; save the high part of cnt
        pop     ax              ; dx:ax = orig dx mod 55: orig ax
                                ; now the division is safe

        ; end code for delay bug fix

        DIV     CX

        ...

@@1:    MOV     AX,DelayCnt
        ;XOR     DX,DX         ; commented out for delay bug fix
        mov     dx,DelayCntHi  ; added for delay bug fix

Quote
>Has anyone out there experienced the same, is there another bug in the
>runtime-library, that has anything with machine-speed to do, please anyone.
>The truth is in here (i hope) ?

Or maybe the bug is in your code.

Quote

>Jens Kristensen, Denmark

Osmo

Other Threads