mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 11:29:16 +02:00
* use SI instead of DI in the asm GetPixelX
git-svn-id: trunk@41029 -
This commit is contained in:
parent
8da6e23d0d
commit
948328160b
@ -2495,24 +2495,24 @@ const CrtAddress: word = 0;
|
|||||||
{$else FPC_MM_HUGE}
|
{$else FPC_MM_HUGE}
|
||||||
mov es, [SegA000]
|
mov es, [SegA000]
|
||||||
{$endif FPC_MM_HUGE}
|
{$endif FPC_MM_HUGE}
|
||||||
mov di,[Y] ; (* DI = Y coordinate *)
|
mov si,[Y] ; (* SI = Y coordinate *)
|
||||||
add di,[StartYViewPort]
|
add si,[StartYViewPort]
|
||||||
(* Multiply by 80 start *)
|
(* Multiply by 80 start *)
|
||||||
mov cl, 4
|
mov cl, 4
|
||||||
shl di, cl
|
shl si, cl
|
||||||
mov bx, di
|
mov bx, si
|
||||||
shl di, 1
|
shl si, 1
|
||||||
shl di, 1
|
shl si, 1
|
||||||
add di, bx ; (* Multiply Value by 80 *)
|
add si, bx ; (* Multiply Value by 80 *)
|
||||||
(* End multiply by 80 *)
|
(* End multiply by 80 *)
|
||||||
mov cx, [X]
|
mov cx, [X]
|
||||||
add cx, [StartXViewPort]
|
add cx, [StartXViewPort]
|
||||||
mov ax, cx
|
mov ax, cx
|
||||||
{DI = Y * LINESIZE, BX = X, coordinates admissible}
|
{SI = Y * LINESIZE, BX = X, coordinates admissible}
|
||||||
shr ax, 1 ; (* Faster on 286/86 machines *)
|
shr ax, 1 ; (* Faster on 286/86 machines *)
|
||||||
shr ax, 1
|
shr ax, 1
|
||||||
add di, ax ; {DI = Y * LINESIZE + (X SHR 2) }
|
add si, ax ; {SI = Y * LINESIZE + (X SHR 2) }
|
||||||
add di, [VideoOfs] ; (* Pointing at start of Active page *)
|
add si, [VideoOfs] ; (* Pointing at start of Active page *)
|
||||||
(* Select plane to use *)
|
(* Select plane to use *)
|
||||||
mov dx, 03ceh
|
mov dx, 03ceh
|
||||||
mov al, 4
|
mov al, 4
|
||||||
@ -2520,7 +2520,7 @@ const CrtAddress: word = 0;
|
|||||||
mov ah, cl
|
mov ah, cl
|
||||||
out dx, ax
|
out dx, ax
|
||||||
(* End selection of plane *)
|
(* End selection of plane *)
|
||||||
mov al, ES:[DI]
|
mov al, ES:[SI]
|
||||||
xor ah, ah
|
xor ah, ah
|
||||||
{$ifdef FPC_GRAPH_SUPPORTS_TRUECOLOR}
|
{$ifdef FPC_GRAPH_SUPPORTS_TRUECOLOR}
|
||||||
{ 1 byte shorter than 'xor dx, dx'; will always set dx to 0, because sign(ah)=0 }
|
{ 1 byte shorter than 'xor dx, dx'; will always set dx to 0, because sign(ah)=0 }
|
||||||
|
Loading…
Reference in New Issue
Block a user