Browse Source

* do the view port adjustment in asm instead of pascal in the asm version of
GetPixel320

git-svn-id: trunk@40916 -

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

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

@@ -2282,8 +2282,6 @@ End;
 {$else asmgraph}
  Function GetPixel320(X,Y: smallint):ColorType;
   Begin
-   X:= X + StartXViewPort;
-   Y:= Y + StartYViewPort;
    asm
 {$ifdef FPC_MM_HUGE}
       mov    ax, SEG SegA000
@@ -2293,7 +2291,9 @@ End;
       mov    es, [SegA000]
 {$endif FPC_MM_HUGE}
       mov    ax, [Y]
+      add    ax, [StartYViewPort]
       mov    di, [X]
+      add    di, [StartXViewPort]
       xchg   ah, al            { The value of Y must be in AH }
       add    di, ax
       shr    ax, 1