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