File:  [OS/2 SDKs] / os2sdk / demos / examples / iopl / ioplmain.c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:26:20 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1988, HEAD
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);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.