Go to the first, previous, next, last section, table of contents.


Screen Variables

Syntax

#include <go32.h>
#include <pc.h>

unsigned long ScreenPrimary;
unsigned long ScreenSecondary;
extern unsigned char ScreenAttrib;

Description

The first two variables (actually, they are #define'd aliases to fields in the _go32_info_block structure see section _go32_info_block) allow access to the video memory of the primary and secondary screens as if they were arrays. To reference them, you must use dosmemget()/dosmemput() functions (section dosmemget, section dosmemput) or any one of the far pointer functions (see section _far*), as the video memory is not mapped into your default address space.

The variable ScreenAttrib holds the current attribute which is in use by the text screen writes. The attribute is constructed as follows:

bits 0-3 -- foreground color;

bits 4-6 -- background color;

bit 7 -- blink on (1) or off (0).

Example

_farpokew(_dos_ds, ScreenPrimary, ( ((unsigned short) attr) << 8) + char ));




Go to the first, previous, next, last section, table of contents.