Browse Source

+ also save/restore DS before/after the int 10h call inside SetCGAPalette and SetCGABorder

git-svn-id: trunk@41014 -
nickysn 6 years ago
parent
commit
b48e901ed8
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

@@ -566,23 +566,27 @@ var
 procedure SetCGAPalette(CGAPaletteID: Byte); assembler;
 asm
   mov ax,CGAPaletteID
-  push bp
   mov bl, al
   mov bh, 1
   mov ah, 0Bh
+  push ds
+  push bp
   int 10h
   pop bp
+  pop ds
 end;
 
 procedure SetCGABorder(CGABorder: Byte); assembler;
 asm
   mov ax,CGABorder
-  push bp
   mov bl, al
   mov bh, 0
   mov ah, 0Bh
+  push ds
+  push bp
   int 10h
   pop bp
+  pop ds
 end;
 
 procedure SetBkColorCGA320(ColorNum: ColorType);