mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 13:08:00 +02:00
Save and restore ES register in InitDelay and Delay
git-svn-id: trunk@37013 -
This commit is contained in:
parent
5d96ca4baf
commit
cc9d506512
@ -460,6 +460,8 @@ begin
|
||||
{ and interrupts are always disabled at this point when }
|
||||
{ running a program inside gdb(pas). Web bug 1345 (JM) }
|
||||
sti
|
||||
mov es,ax
|
||||
push ax
|
||||
mov ax, $40
|
||||
mov es, ax
|
||||
mov di, $6c
|
||||
@ -474,6 +476,8 @@ LInitDel1:
|
||||
|
||||
mov word ptr [DelayCnt], ax
|
||||
mov word ptr [DelayCnt + 2], dx
|
||||
pop ax
|
||||
mov ax,es
|
||||
end ['AX','BX','DX', 'DI'];
|
||||
DelayCnt := -DelayCnt div $55;
|
||||
end;
|
||||
@ -483,6 +487,8 @@ procedure Delay(MS: Word);assembler;
|
||||
label
|
||||
LDelay1, LDelay2;
|
||||
asm
|
||||
mov es,ax
|
||||
push ax
|
||||
mov ax, $40
|
||||
mov es, ax
|
||||
xor di, di
|
||||
@ -498,6 +504,8 @@ LDelay1:
|
||||
call DelayLoop
|
||||
loop LDelay1
|
||||
LDelay2:
|
||||
pop ax
|
||||
mov ax,es
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user