Browse Source

* use only 8086/8088-compatible instructions in the asm GetPixelX

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

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

@@ -2501,9 +2501,11 @@ const CrtAddress: word = 0;
 {$endif FPC_MM_HUGE}
 {$endif FPC_MM_HUGE}
       mov di,[Y]                   ; (* DI = Y coordinate                 *)
       mov di,[Y]                   ; (* DI = Y coordinate                 *)
       (* Multiply by 80 start *)
       (* Multiply by 80 start *)
+      mov cl, 4
+      shl di, cl
       mov bx, di
       mov bx, di
-      shl di, 6                    ; (* Faster on 286/386/486 machines    *)
-      shl bx, 4
+      shl di, 1
+      shl di, 1
       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]