mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-09 03:49:34 +01:00
* perform the viewport adjustment in asm instead of pascal in PutPixelX
git-svn-id: trunk@41034 -
This commit is contained in:
parent
55f8c0f99a
commit
a0924c9bbb
@ -2620,8 +2620,6 @@ const CrtAddress: word = 0;
|
|||||||
if (Y < 0) or (Y > ViewHeight) then
|
if (Y < 0) or (Y > ViewHeight) then
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
X:= X + StartXViewPort;
|
|
||||||
Y:= Y + StartYViewPort;
|
|
||||||
asm
|
asm
|
||||||
push ax
|
push ax
|
||||||
push bx
|
push bx
|
||||||
@ -2630,6 +2628,7 @@ const CrtAddress: word = 0;
|
|||||||
push es
|
push es
|
||||||
push di
|
push di
|
||||||
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
|
||||||
@ -2639,6 +2638,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
|
shr ax, 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user