[fpc-pascal]Reading the color attributes from the screen
James_Wilson at i2.com
James_Wilson at i2.com
Fri Aug 17 22:28:48 CEST 2001
The following bit of code is something I use in my go32v2 (DOS) programs
to save/restore the contents of the screen to/from memory. It works great
except that it takes the colors as they appear on the screen (which is
okay most of the time). But is there a way I can store/reset the color
attributes either directly on the screen or in the array after I've saved
the screen? Or perhaps there's another mem[] region I can grab and modify
the colors their instead?
TIA...
Jim
// for screens up to 132x60
const
BUF_SIZE = 7920;
// array to hold screen contents
var
ScreenBuffer : array [1..BUF_SIZE] of byte;
// save the entire screen to memory
move (mem [$B8000],ScreenBuffer,BUF_SIZE);
// restore the screen from memory
move (ScreenBuffer,mem [$B8000],BUF_SIZE);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20010817/e07444eb/attachment.html>
More information about the fpc-pascal
mailing list