Browse Source

* SetVisual200 and SetVisual350 combined into one procedure, because they share the same code

git-svn-id: trunk@41010 -
nickysn 6 years ago
parent
commit
4569d47417
1 changed files with 5 additions and 21 deletions
  1. 5 21
      packages/graph/src/msdos/graph.pp

+ 5 - 21
packages/graph/src/msdos/graph.pp

@@ -2146,8 +2146,7 @@ End;
   End;
   End;
 
 
 
 
- procedure SetVisual200(page: word);
-  { four page support... }
+ procedure SetVisual200_350(page: word);
   begin
   begin
     if page > HardwarePages then exit;
     if page > HardwarePages then exit;
     asm
     asm
@@ -2174,21 +2173,6 @@ End;
     end;
     end;
   end;
   end;
 
 
- procedure SetVisual350(page: word);
-  { one page supPort... }
-  begin
-    if page > HardwarePages then exit;
-    asm
-      mov ax,[page]    { only lower byte is supPorted. }
-      mov ah,05h
-      push ds
-      push bp
-      int 10h
-      pop bp
-      pop ds
-    end ['DX','CX','BX','AX','SI','DI'];
-  end;
-
  procedure SetActive350(page: word);
  procedure SetActive350(page: word);
   { one page supPort... }
   { one page supPort... }
   begin
   begin
@@ -3441,7 +3425,7 @@ const CrtAddress: word = 0;
          mode.MaxX := 639;
          mode.MaxX := 639;
          mode.MaxY := 199;
          mode.MaxY := 199;
          mode.HardwarePages := 3;
          mode.HardwarePages := 3;
-         mode.SetVisualPage := @SetVisual200;
+         mode.SetVisualPage := @SetVisual200_350;
          mode.SetActivePage := @SetActive200;
          mode.SetActivePage := @SetActive200;
          mode.InitMode := @Init640x200x16;
          mode.InitMode := @Init640x200x16;
          mode.XAspect := 4500;
          mode.XAspect := 4500;
@@ -3456,7 +3440,7 @@ const CrtAddress: word = 0;
          mode.MaxX := 639;
          mode.MaxX := 639;
          mode.MaxY := 349;
          mode.MaxY := 349;
          mode.HardwarePages := 1;
          mode.HardwarePages := 1;
-         mode.SetVisualPage := @SetVisual350;
+         mode.SetVisualPage := @SetVisual200_350;
          mode.SetActivePage := @SetActive350;
          mode.SetActivePage := @SetActive350;
          mode.InitMode := @Init640x350x16;
          mode.InitMode := @Init640x350x16;
          mode.XAspect := 7750;
          mode.XAspect := 7750;
@@ -3614,7 +3598,7 @@ const CrtAddress: word = 0;
          mode.MaxX := 639;
          mode.MaxX := 639;
          mode.MaxY := 199;
          mode.MaxY := 199;
          mode.HardwarePages := 3;
          mode.HardwarePages := 3;
-         mode.SetVisualPage := @SetVisual200;
+         mode.SetVisualPage := @SetVisual200_350;
          mode.SetActivePage := @SetActive200;
          mode.SetActivePage := @SetActive200;
          mode.InitMode := @Init640x200x16;
          mode.InitMode := @Init640x200x16;
          mode.XAspect := 4500;
          mode.XAspect := 4500;
@@ -3629,7 +3613,7 @@ const CrtAddress: word = 0;
          mode.MaxX := 639;
          mode.MaxX := 639;
          mode.MaxY := 349;
          mode.MaxY := 349;
          mode.HardwarePages := 1;
          mode.HardwarePages := 1;
-         mode.SetVisualPage := @SetVisual350;
+         mode.SetVisualPage := @SetVisual200_350;
          mode.SetActivePage := @SetActive350;
          mode.SetActivePage := @SetActive350;
          mode.InitMode := @Init640x350x16;
          mode.InitMode := @Init640x350x16;
          mode.XAspect := 7750;
          mode.XAspect := 7750;