Browse Source

* huge model safe initialization of ES in DirectPutPixelX

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

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

@@ -2695,6 +2695,13 @@ const CrtAddress: word = 0;
  Procedure DirectPutPixelX(X,Y: smallint); assembler;
  Procedure DirectPutPixelX(X,Y: smallint); assembler;
  { note: still needs or/and/notput support !!!!! (JM) }
  { note: still needs or/and/notput support !!!!! (JM) }
  asm
  asm
+{$ifdef FPC_MM_HUGE}
+   mov bx, SEG SegA000
+   mov es, bx
+   mov es, es:[SegA000]
+{$else FPC_MM_HUGE}
+   mov es, [SegA000]
+{$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
    mov cl, 4
@@ -2718,7 +2725,6 @@ const CrtAddress: word = 0;
    shl ah, cl                ; (* Get Plane Select Value           *)
    shl ah, cl                ; (* Get Plane Select Value           *)
    out dx, ax
    out dx, ax
  (* End selection of plane *)
  (* End selection of plane *)
-   mov es,[SegA000]
    mov ax,[CurrentColor]     ; { only lower byte is used. }
    mov ax,[CurrentColor]     ; { only lower byte is used. }
    cmp [CurrentWriteMode],XORPut   { check write mode   }
    cmp [CurrentWriteMode],XORPut   { check write mode   }
    jne @MOVMode
    jne @MOVMode