|
|
1.1 ! root 1: /* This example illustrates the use of an IOPL segment. This program ! 2: * gets the cursor location by calling a routine running at I/O ! 3: * privilege level and prints it on the screen. ! 4: * ! 5: * This needs to run on a CGA compatible display. ! 6: * ! 7: * Copyright (C) Microsoft Corp. 1986 ! 8: */ ! 9: ! 10: #define COLUMNS 80 /* number of columns on CRT screen */ ! 11: ! 12: unsigned far GetCurLoc(); /* gets cursor position on CRT screen*/ ! 13: ! 14: main() ! 15: { ! 16: unsigned Cursor; /* will hold cursor position */ ! 17: ! 18: Cursor = GetCurLoc(); ! 19: printf ( "cursor location: row = %u, column = %u\n", ! 20: (Cursor/COLUMNS)+1, (Cursor % COLUMNS)+1); ! 21: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.