* do the view port adjustment in asm instead of pascal in the asm version of

GetPixel320

git-svn-id: trunk@40916 -
This commit is contained in:
nickysn 2019-01-19 16:59:15 +00:00
parent 8c1de487c5
commit 9745c6434a

View File

@ -2282,8 +2282,6 @@ End;
{$else asmgraph}
Function GetPixel320(X,Y: smallint):ColorType;
Begin
X:= X + StartXViewPort;
Y:= Y + StartYViewPort;
asm
{$ifdef FPC_MM_HUGE}
mov ax, SEG SegA000
@ -2293,7 +2291,9 @@ End;
mov es, [SegA000]
{$endif FPC_MM_HUGE}
mov ax, [Y]
add ax, [StartYViewPort]
mov di, [X]
add di, [StartXViewPort]
xchg ah, al { The value of Y must be in AH }
add di, ax
shr ax, 1