* moved the ES register initialization in GetPixel16 to the beginning of the function

git-svn-id: trunk@40988 -
This commit is contained in:
nickysn 2019-01-22 14:28:46 +00:00
parent 6753237fe4
commit f1ad989ba1

View File

@ -1673,6 +1673,13 @@ end;
{$else asmgraph}
Function GetPixel16(X,Y: smallint):ColorType;assembler;
asm
{$ifdef FPC_MM_HUGE}
mov ax, SEG SegA000
mov es, ax
mov es, es:[SegA000]
{$else FPC_MM_HUGE}
mov es, [SegA000]
{$endif FPC_MM_HUGE}
mov ax, [X] { Get X address }
add ax, [StartXViewPort]
mov di, ax
@ -1690,14 +1697,6 @@ end;
add si, ax { SI=correct offset into video segment }
add si, [VideoOfs] { Point to correct page offset... }
{$ifdef FPC_MM_HUGE}
mov ax, SEG SegA000
mov es, ax
mov es, es:[SegA000]
{$else FPC_MM_HUGE}
mov es, [SegA000]
{$endif FPC_MM_HUGE}
mov dx,03ceh
mov ax,0304h
out dx,ax