On Tue, 20 Jun 2006, Michael Preslar wrote:
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?
The short answer: You simply can't... You must use the 'video' unit to do this kind of tricks in a more or less cross-platform way, but you'll have to rewrite your code completely. You may also want to have a look at the ncurses unit and the various descendents, ocrt, ncrt. video is documented, and is part of the RTL. The others are in the packages. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal