Browse Source

* use SegB000 instead of the $B000 constant in InitHGC720. This will make the
code compatible with 16-bit protected mode DOS targets, when they get
implemented.

git-svn-id: trunk@41013 -

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

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

@@ -200,10 +200,14 @@ begin
   for I := 0 to 11 do
   for I := 0 to 11 do
     PortW[$3B4] := I or (RegValues[I] shl 8);
     PortW[$3B4] := I or (RegValues[I] shl 8);
   Port[$3B8] := 10; { display page 0, graphic mode, display on }
   Port[$3B8] := 10; { display page 0, graphic mode, display on }
-//  DosMemFillChar($B000, 0, 65536, #0);
   asm
   asm
-    mov ax, $B000
+{$ifdef FPC_MM_HUGE}
+    mov ax, SEG SegB000
     mov es, ax
     mov es, ax
+    mov es, es:[SegB000]
+{$else FPC_MM_HUGE}
+    mov es, [SegB000]
+{$endif FPC_MM_HUGE}
     mov cx, 32768
     mov cx, 32768
     xor di, di
     xor di, di
     xor ax, ax
     xor ax, ax