mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 03:39:28 +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}
|
||||
function GetPixelX(X,Y: smallint): ColorType;
|
||||
begin
|
||||
X := X + StartXViewPort;
|
||||
Y := Y + StartYViewPort;
|
||||
asm
|
||||
{$ifdef FPC_MM_HUGE}
|
||||
mov ax, SEG SegA000
|
||||
@ -2500,6 +2498,7 @@ const CrtAddress: word = 0;
|
||||
mov es, [SegA000]
|
||||
{$endif FPC_MM_HUGE}
|
||||
mov di,[Y] ; (* DI = Y coordinate *)
|
||||
add di,[StartYViewPort]
|
||||
(* Multiply by 80 start *)
|
||||
mov cl, 4
|
||||
shl di, cl
|
||||
@ -2509,6 +2508,7 @@ const CrtAddress: word = 0;
|
||||
add di, bx ; (* Multiply Value by 80 *)
|
||||
(* End multiply by 80 *)
|
||||
mov cx, [X]
|
||||
add cx, [StartXViewPort]
|
||||
mov ax, cx
|
||||
{DI = Y * LINESIZE, BX = X, coordinates admissible}
|
||||
shr ax, 1 ; (* Faster on 286/86 machines *)
|
||||
|
Loading…
Reference in New Issue
Block a user