Browse Source

* swap AL and AH in the last 'or' instruction in GetPixel16, so the result is
combined directly into AL and a 'mov al, ah' instruction is removed

git-svn-id: trunk@40994 -

nickysn 6 years ago
parent
commit
06dbc518e4
1 changed files with 2 additions and 4 deletions
  1. 2 4
      packages/graph/src/msdos/graph.pp

+ 2 - 4
packages/graph/src/msdos/graph.pp

@@ -1734,12 +1734,10 @@ end;
     seges lodsb
     and   al,bh
     rol   ah,1
-    or    ah,al            { save bit in AH       }
+    or    al,ah            { add previous bits from AH into AL }
 
     inc   cx
-    rol   ah,cl
-
-    mov   al,ah            { 16-bit pixel in AX   }
+    rol   al,cl            { 16-bit pixel in AX   }
     { 1 byte shorter than 'xor ah, ah'; will always set ah to 0, because sign(al)=0 }
     cbw
 {$ifdef FPC_GRAPH_SUPPORTS_TRUECOLOR}