Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - scrattr() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SCRATTR()
 Obtains the current SET COLOR values at the current cursor position.
 Returns <expC> uppercase letter value of current SET COLOR.

 Useful in "black box" routines that change the screen.

 Save the screen values before changing the screen or moving the cursor.

 Uses BIOSATTR() to get the screen attributes from the ROM BIOS.

 * Optionally move the cursor to the screen position
 * from which you want to read the color setting.
 @ 12,42 SAY ""   && null string moves cursor, does not change screen

 * Save current screen values
 scr_value = SCRATTR()

 <code that changes the screen>

 * Restore original screen values before exiting
 SET COLOR TO (scr_value)


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: BIOSATTR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson