From 985ec0688add821fc20102296ec7b54db7942a01 Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 22 Jan 2019 12:58:02 +0000 Subject: [PATCH] * some more optimizations in GetPixel16 git-svn-id: trunk@40986 - --- packages/graph/src/msdos/graph.pp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/graph/src/msdos/graph.pp b/packages/graph/src/msdos/graph.pp index e000786b20..456eca8153 100644 --- a/packages/graph/src/msdos/graph.pp +++ b/packages/graph/src/msdos/graph.pp @@ -1702,37 +1702,41 @@ end; inc dx mov cx, di - not cx and cl,7 + mov bh, 080h + shr bh, cl + { read plane 3 } mov ah,es:[si] { read display memory } - shr ah,cl - and ah,01h { save bit in AH } + and ah,bh { save bit in AH } { read plane 2 } mov al,2 { Select plane to read } out dx,al mov bl,es:[si] - shr bl,cl - shr bl,1 - rcl ah,1 { save bit in AH } + and bl,bh + rol ah,1 + or ah,bl { save bit in AH } { read plane 1 } dec ax { Select plane to read } out dx,al mov bl,es:[si] - shr bl,cl - shr bl,1 - rcl ah,1 { save bit in AH } + and bl,bh + rol ah,1 + or ah,bl { save bit in AH } { read plane 0 } dec ax { Select plane to read } out dx,al mov bl,es:[si] - shr bl,cl - shr bl,1 - rcl ah,1 { save bit in AH } + and bl,bh + rol ah,1 + or ah,bl { save bit in AH } + + inc cx + rol ah,cl mov al,ah { 16-bit pixel in AX } { 1 byte shorter than 'xor ah, ah'; will always set ah to 0, because sign(al)=0 }