home *** CD-ROM | disk | FTP | other *** search
- /* By request, here's 6 lines of C to turn the NumLock on */
- /* Based on Fran Horvath's routine to turn it off. */
- /* Converted by Howard Sanner, 28 Jan 88. */
-
- typedef unsigned char (far *MEM);
-
- /* Number lock function in C ---
- * Sets number lock to ON.
- * Assumes keyboard flag is at 0000:0417H in Model 60
- * Check your documentation and change
- * segment and offset below if not.
- * Also works fine on PCs and ATs.
- */
-
- num_lock()
- {
- MEM charset = ((MEM)(0x0000L << 16 )) + 0x0417L;
- *charset |= 0x20; /* Turns Num Lock on if off */
- /* Change the above line to: *charset &= 0xDF; to turn num lock OFF if it is ON. */
- }
-
- main()
- {
- num_lock();
- }