From 55f1b860afa3b13da58e6cac6b44776c6a6ff05b Mon Sep 17 00:00:00 2001 From: nickysn Date: Sat, 5 Oct 2013 18:06:44 +0000 Subject: [PATCH] * SaveStateVGA and RestoreStateVGA rewritten to use intr git-svn-id: trunk@25655 - --- packages/graph/src/msdos/graph.pp | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/packages/graph/src/msdos/graph.pp b/packages/graph/src/msdos/graph.pp index 90efaffae9..a0245462ba 100644 --- a/packages/graph/src/msdos/graph.pp +++ b/packages/graph/src/msdos/graph.pp @@ -2978,19 +2978,9 @@ const CrtAddress: word = 0; SaveSupPorted := FALSE; SavePtr := nil; { Get the video mode } - asm - mov ah,0fh - push bp - push si - push di - push bx - int 10h - pop bx - pop di - pop si - pop bp - mov [VideoMode], al - end ['AX']; + regs.ah:=$0f; + intr($10,regs); + VideoMode:=regs.al; { saving/restoring video state screws up Windows (JM) } if inWindows then exit; @@ -3062,19 +3052,8 @@ const CrtAddress: word = 0; regs:Registers; begin { go back to the old video mode...} - asm - mov ah,00 - mov al,[VideoMode] - push bp - push si - push di - push bx - int 10h - pop bx - pop di - pop si - pop bp - end ['AX']; + regs.ax:=VideoMode; + intr($10,regs); (* { then restore all state information } {$ifndef fpc} if assigned(SavePtr) and (SaveSupPorted=TRUE) then