[fpc-pascal] Cross Platform Save/Restore Screen
Michael Preslar
mike at lordlegacy.com
Tue Jun 20 16:45:50 CEST 2006
Back in the DOS Turbo Pascal days I could do the following
type
screentype= array[1..4000] of byte;
screenptr=^screentype;
var
screen1: screenptr;
procedure savescreen(scr:byte);
var
sc1: byte absolute $b000:0;
sc2: byte absolute $b800:0;
begin;
if screenaddress=$b000 then move(sc1,screens1^,4000);
if screenaddress=$b800 then move(sc2,screens1^,4000);
end;
procedure restorescreen(scr:byte);
var
sc1: byte absolute $b800:0;
sc2: byte absolute $b000:0;
begin;
if screenaddress=$b000 then move(screens1^, sc2,4000);
if screenaddress=$b800 then move(screens1^, sc1,4000);
end;
Now I'm stuck. How can I do the same for Win32 Console apps, and
*nix/*bsd console apps?
(For anyone wondering.. I'm the Legend of the Red Dragon developer
[remember that old beast?], and after porting LORD to Win32, *nix [and
mostly *bsd .. Just need to replace the dependance on the 'oldlinux'
unit], and os2, I'm converting LordCfg to a native binary as well, and
need the savescreen/restorescreen for the eyecandy part of the program)
--
Michael Preslar
Landline: (402) 614-3551
Cell: (402) 990-8001
More information about the fpc-pascal
mailing list