$CPU 8086 ' make compatible with XT systems $LIB ALL OFF ' turn off all PowerBASIC libraries $ERROR ALL OFF ' turn off all PowerBASIC error checking $OPTIMIZE SIZE ' optimize for smaller code '$COMPILE EXE ' compile to a UNIT (.PBU) $COMPILE UNIT ' compile to a UNIT (.PBU) DEFINT A-Z ' Required for all numeric functions, forces PB to not ' include floating point in UNIT (makes it smaller) '/*------------------------------------------------------------------*/ $CODE SEG "MLIB4" '/*------------------------------------------------------------------*/ ' CURSOR OPTION$ ' Controls the display cursor. ' OPTION$ = ON - Dsplays small underline cursor (normal) ' OFF - Turns the display cursor off ' SBLOCK - Displays a small block cursor ' MBLOCK - Displays a medium sized block cursor ' LBLOCK - Displays a large block cursor. '/*------------------------------------------------------------------*/ SUB CURSOR(BYVAL OPT AS STRING) PUBLIC OPT = UCASE$(OPT) IF OPT = "OFF" THEN LOCATE,,0 END IF IF OPT = "LBLOCK" THEN LOCATE,,1,0,7 END IF IF OPT = "SBLOCK" THEN LOCATE,,1,0,3 END IF IF OPT = "MBLOCK" THEN LOCATE,,1,4,7 END IF IF OPT = "LINE" OR OPT = "NORMAL" OR OPT = "ON" THEN LOCATE,,1,6,7 END IF END SUB '/*------------------------------------------------------------------*/ ' CLS ' PRINT "CURSOR IS OFF?" ' CURSOR "OFF" ' GOSUB GETKEY ' PRINT "CURSOR ON" ' CURSOR "ON" ' GOSUB GETKEY ' PRINT "CURSOR SBLOCK" ' CURSOR "SBLOCK" ' GOSUB GETKEY ' PRINT "CURSOR MBLOCK" ' CURSOR "MBLOCK" ' GOSUB GETKEY ' PRINT "CURSOR LARGE" ' CURSOR "LBLOCK" ' GOSUB GETKEY ' PRINT "CURSOR NORMAL" ' CURSOR "LINE" ' GOSUB GETKEY ' END ' GETKEY: ' DO ' Y$ = INKEY$ ' LOOP UNTIL Y$ <> "" ' RETURN