Michael Preslar wrote:
Back in the DOS Turbo Pascal days I could do the followingtype 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)
I'm sending a unit that has such functions for win32.I've used this unit in a homebrew console ui "toolkit", but be aware that the last time i compiled it was in fpc106 days so maybe is not compiling in today fpc. Anyway, you can have a idea how implement it. The functions you must look are: SalvarTela(SaveScreen) and RestaurarTela(RestoreScreen).
Luiz
luiunit.tar.gz
Description: GNU Zip compressed data
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal