소스 검색

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

git-svn-id: trunk@40988 -
nickysn 6 년 전
부모
커밋
f1ad989ba1
1개의 변경된 파일7개의 추가작업 그리고 8개의 파일을 삭제
  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