mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 12:26:02 +02:00
* viewport adjustment converted to asm in the asm version of GetPixelX
git-svn-id: trunk@41018 -
This commit is contained in:
parent
d5b8e84352
commit
46f3c742f3
@ -2489,8 +2489,6 @@ const CrtAddress: word = 0;
|
|||||||
{$else asmgraph}
|
{$else asmgraph}
|
||||||
function GetPixelX(X,Y: smallint): ColorType;
|
function GetPixelX(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
|
||||||
@ -2500,6 +2498,7 @@ const CrtAddress: word = 0;
|
|||||||
mov es, [SegA000]
|
mov es, [SegA000]
|
||||||
{$endif FPC_MM_HUGE}
|
{$endif FPC_MM_HUGE}
|
||||||
mov di,[Y] ; (* DI = Y coordinate *)
|
mov di,[Y] ; (* DI = Y coordinate *)
|
||||||
|
add di,[StartYViewPort]
|
||||||
(* Multiply by 80 start *)
|
(* Multiply by 80 start *)
|
||||||
mov cl, 4
|
mov cl, 4
|
||||||
shl di, cl
|
shl di, cl
|
||||||
@ -2509,6 +2508,7 @@ const CrtAddress: word = 0;
|
|||||||
add di, bx ; (* Multiply Value by 80 *)
|
add di, bx ; (* Multiply Value by 80 *)
|
||||||
(* End multiply by 80 *)
|
(* End multiply by 80 *)
|
||||||
mov cx, [X]
|
mov cx, [X]
|
||||||
|
add cx, [StartXViewPort]
|
||||||
mov ax, cx
|
mov ax, cx
|
||||||
{DI = Y * LINESIZE, BX = X, coordinates admissible}
|
{DI = Y * LINESIZE, BX = X, coordinates admissible}
|
||||||
shr ax, 1 ; (* Faster on 286/86 machines *)
|
shr ax, 1 ; (* Faster on 286/86 machines *)
|
||||||
|
Loading…
Reference in New Issue
Block a user