Browse Source

* moved the ES register initialization in GetPixel16 to the beginning of the function

git-svn-id: trunk@40988 -
nickysn 6 years ago
parent
commit
f1ad989ba1
1 changed files with 7 additions and 8 deletions
  1. 7 8
      packages/graph/src/msdos/graph.pp

+ 7 - 8
packages/graph/src/msdos/graph.pp

@@ -1673,6 +1673,13 @@ end;
 {$else asmgraph}
  Function GetPixel16(X,Y: smallint):ColorType;assembler;
   asm
+{$ifdef FPC_MM_HUGE}
+    mov   ax, SEG SegA000
+    mov   es, ax
+    mov   es, es:[SegA000]
+{$else FPC_MM_HUGE}
+    mov   es, [SegA000]
+{$endif FPC_MM_HUGE}
     mov   ax, [X]          { Get X address                    }
     add   ax, [StartXViewPort]
     mov   di, ax
@@ -1690,14 +1697,6 @@ end;
     add   si, ax           { SI=correct offset into video segment }
     add   si, [VideoOfs]   { Point to correct page offset... }
 
-{$ifdef FPC_MM_HUGE}
-    mov   ax, SEG SegA000
-    mov   es, ax
-    mov   es, es:[SegA000]
-{$else FPC_MM_HUGE}
-    mov   es, [SegA000]
-{$endif FPC_MM_HUGE}
-
     mov   dx,03ceh
     mov   ax,0304h
     out   dx,ax