Browse Source

* some minor optimizations in PutPixel16 (more efficient register usage, resulting in less mov instructions)

git-svn-id: trunk@40997 -
nickysn 6 years ago
parent
commit
36c349696e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      packages/graph/src/msdos/graph.pp

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

@@ -1618,16 +1618,16 @@ end;
         { setup the bit mask register }
         { setup the bit mask register }
         mov  al, 8
         mov  al, 8
         { load the bitmask register }
         { load the bitmask register }
-        mov  cl, byte ptr [X]
+        mov  bx, [X]
+        mov  cl, bl
         and  cl, 07h
         and  cl, 07h
         mov  ah, 80h
         mov  ah, 80h
         shr  ah, cl
         shr  ah, cl
         out  dx, ax
         out  dx, ax
         { get the x index and divide by 8 for 16-color }
         { get the x index and divide by 8 for 16-color }
-        mov  ax,[X]
+        mov  si, bx
         mov  cl, 3
         mov  cl, 3
-        shr  ax, cl
-        xchg ax, si
+        shr  si, cl
         { determine the address }
         { determine the address }
         mov  ax,80
         mov  ax,80
         mov  bx,[Y]
         mov  bx,[Y]