|
|
Microsoft OS/2 SDK 03-01-1988
/* This example illustrates the use of an IOPL segment. This program
* gets the cursor location by calling a routine running at I/O
* privilege level and prints it on the screen.
*
* This needs to run on a CGA compatible display.
*
* Created by Microsoft Corp. 1986
*/
#define COLUMNS 80 /* number of columns on CRT screen */
unsigned far GetCurLoc(); /* gets cursor position on CRT screen*/
main()
{
unsigned Cursor; /* will hold cursor position */
Cursor = GetCurLoc();
printf ( "cursor location: row = %u, column = %u\n",
(Cursor/COLUMNS)+1, (Cursor % COLUMNS)+1);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.