mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 00:29:20 +02:00
+ implemented all the write modes in the asm version of DirectPutPixelX
git-svn-id: trunk@41056 -
This commit is contained in:
parent
3e22a0625f
commit
4a93ae0023
@ -2693,7 +2693,6 @@ const CrtAddress: word = 0;
|
|||||||
end;
|
end;
|
||||||
{$else asmgraph}
|
{$else asmgraph}
|
||||||
Procedure DirectPutPixelX(X,Y: smallint); assembler;
|
Procedure DirectPutPixelX(X,Y: smallint); assembler;
|
||||||
{ note: still needs or/and/notput support !!!!! (JM) }
|
|
||||||
asm
|
asm
|
||||||
{$ifdef FPC_MM_HUGE}
|
{$ifdef FPC_MM_HUGE}
|
||||||
mov bx, SEG SegA000
|
mov bx, SEG SegA000
|
||||||
@ -2726,12 +2725,51 @@ const CrtAddress: word = 0;
|
|||||||
out dx, ax
|
out dx, ax
|
||||||
(* End selection of plane *)
|
(* End selection of plane *)
|
||||||
mov al, byte ptr [CurrentColor] ; { only lower byte is used. }
|
mov al, byte ptr [CurrentColor] ; { only lower byte is used. }
|
||||||
cmp [CurrentWriteMode],XORPut { check write mode }
|
{ check write mode }
|
||||||
jne @MOVMode
|
mov bl, byte ptr [CurrentWriteMode]
|
||||||
mov ah,es:[di] { read the byte... }
|
cmp bl, NormalPut
|
||||||
xor al,ah { xor it and return value into AL }
|
jne @@1
|
||||||
@MovMode:
|
{ NormalPut }
|
||||||
mov es:[di], al
|
stosb
|
||||||
|
jmp @Done
|
||||||
|
@@1:
|
||||||
|
cmp bl, XorPut
|
||||||
|
jne @@2
|
||||||
|
{ XorPut }
|
||||||
|
mov bh, al
|
||||||
|
mov dx, 03ceh
|
||||||
|
mov ah, cl
|
||||||
|
mov al, 4
|
||||||
|
out dx, ax
|
||||||
|
xor es:[di], bh
|
||||||
|
jmp @Done
|
||||||
|
@@2:
|
||||||
|
cmp bl, OrPut
|
||||||
|
jne @@3
|
||||||
|
{ OrPut }
|
||||||
|
mov bh, al
|
||||||
|
mov dx, 03ceh
|
||||||
|
mov ah, cl
|
||||||
|
mov al, 4
|
||||||
|
out dx, ax
|
||||||
|
or es:[di], bh
|
||||||
|
jmp @Done
|
||||||
|
@@3:
|
||||||
|
cmp bl, AndPut
|
||||||
|
jne @NotPutMode
|
||||||
|
{ AndPut }
|
||||||
|
mov bh, al
|
||||||
|
mov dx, 03ceh
|
||||||
|
mov ah, cl
|
||||||
|
mov al, 4
|
||||||
|
out dx, ax
|
||||||
|
and es:[di], bh
|
||||||
|
jmp @Done
|
||||||
|
@NotPutMode:
|
||||||
|
{ NotPut }
|
||||||
|
not al
|
||||||
|
stosb
|
||||||
|
@Done:
|
||||||
end;
|
end;
|
||||||
{$endif asmgraph}
|
{$endif asmgraph}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user