home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1996 September
/
Simtel-MSDOS-Sep1996-CD2.iso
/
disc2
/
c
/
ibmcur.doc
< prev
next >
Wrap
Text File
|
1984-06-23
|
2KB
|
41 lines
The PC/IX routines which generate console output operate rather slowly due
to the extensive terminal emulation performed, and the narrow time window
which the color display affords for updating (vertical retrace period).
These routines operate up to ten times faster, and are useful for
user-intensive interactive programs (such as editors, etc.).
The programs, ibmcur, and ibmprt, set the cursor and print characters
directly in the display's screen memory. Additionally, the programs
Savescrn and Restscrn save the screen buffer and restore it, so that
you can pop up menus or windows and restore the screen when removing
them (without redrawing the whole screen).
Readers of the code will get a good idea of how to construct "C"
programs which use assembly inserts to directly access data outside
of the allocated 64K data segment.
Before you start using any of these routines, you must issue a
printf("\f") call to ensure that the screen buffer on the display
card points to the beginning of the buffer (as it scrolls it drifts
down in memory, and would confuse the submitted programs).
ibmprt operates fast because there is no parsing of the print string
(other than for the ending nul). Do not give it new-lines or terminal
emulation stuff; reserve those for the regular slower printf. ibmprt
will leave the attribute bytes alone.
To print formatted stuff, use sprintf before ibmprt. For example,
char s[80];
int numth = 33;
ibmcur(10,20); /* use line 10, column 20 */
sprintf(s,"This is the %d number", numth);
ibmprt(s);
You may wish to change the screen buffer pointer if you are using other than
the color display card.
The "C" compiler may have to be run without the -O flag.