#ifdef ournix #include "ournix.h" #endif char *sccsID = "@(#) cursor.c, V1.1 Copyright Julian H. Stacey, Munich, 26 Dec 88\n" ; /* Reference: Advanced MSDOS by Ray Duncan, Microsoft Press, Page 400. Int 10H Function 1, IBM PC BIOS video driver services Set Cursor Type */ /* cursor 0 7 sets a full block cursor cursor sets cursor back to default (rows 6 & 7 on) cursor 6 7 also sets cursor back to default (rows 6 & 7 on) cursor n n 1 sets first undocumented bit on cursor n n n 1 sets second undocumented bit on (cursor invisible) For hard to see LCD screens without back-lighting, use a full block cursor. */ #define FIRST_LINE 1 #define LAST_LINE 7 char **ARGV ; #include main(argc,argv) int argc ; char **argv ; { union REGS in ; ARGV = argv ; #ifdef VSL /* { */ #include "../../include/vsl.h" #endif /* } */ in.h.ah = 1 ; /* Function No. 1 */ in.h.ch = 6 ; /* Set cursor top row to default setting */ in.h.cl = 7 ; /* Set cursor bottom row to default setting */ if (--argc == 0) goto set_cursor ; in.h.ch = **++argv - '0' ; if (--argc == 0) goto set_cursor ; in.h.cl = **++argv - '0' ; if (--argc == 0) goto set_cursor ; /* using undocumented bit: narrow the width of cursor increase height of cursor from 2 to 3 */ if (**++argv == '1' ) in.h.ch |= 64 ; /* unfortunately we dont seem to be able to reduce width to original setting */ if (--argc == 0) goto set_cursor ; if (**++argv == '0' ) in.h.ch |= 32 ; /* turning cursor off */ /* turning cursor off doesnt seem to work anymore - but not important */ #define OUT in /* save data space, we dont actually need a seperate output register set */ set_cursor: int86(0x10, &in, &OUT) ; }