40000 ' Subroutine defining VT-102 screen handling variables & functions 40010 ' 40020 ' Call from line 1 thus: 1 GOSUB 40000 40030 ' 40040 E$ = CHR$(27) 'escape 40050 CLR$ = E$+"[2J" 'clear screen 40060 HOME$ = E$+"[H" 'home cursor 40070 GRAPH$ = E$+"(0" 'enter graphics mode 40080 NOGRAPH$ = E$+"(B" 'leave graphics mode 40090 SVE$ = E$+"7" 'save cursor and attributes 40100 RSTR$ = E$+"8" 'restore cursor and attributes 40110 D1$ = E$+"#3" 'double width, double height first line 40120 D2$ = E$+"#4" 'double width, double height second line 40130 SINGL$ = E$+"#5" 'single height, single width 40140 WIDE$ = E$+"#6" 'single height, double width 40150 BOLD$ = E$+"[1m" 'bold attribute 40160 BLINK$ = E$+"[5m" 'blink attribute 40170 UNDER$ = E$+"[4m" 'underline 40180 REVERSE$ = E$+"[7m" 'reverse video 40190 NORMAL$ = E$+"[0m" 'normal attributes 40200 REVSCREEN$ = E$+"[?5h" 'reverse whole screen 40210 NORMSCREEN$ = E$+"[?5l" 'normal whole screen 40220 WIDESCREEN$ = E$+"[?3h" '132 column screen 40230 NORMSCREEN$ = E$+"[?3l" '80 column screen 40240 UNDERCURS$ = E$+"[?1h" 'change cursor to underscore 40250 NORMCURSOR$ = E$+"[?1l" 'block cursor 40260 FUNCKEYPAD$ = E$+"=" 'change keypad to function keys 40270 NORMKEYPAD$ = E$+">" 'keypad to normal digits 40280 ERASETOEOL$ = E$+"[K" 'erase to end of line 40290 ERASETOBOL$ = E$+"[1K" 'erase to beginning of line 40300 ERASELINE$ = E$+"[2K" 'erase whole line 40310 ERASCRNBOT$ = E$+"[0J" 'erase from cursor to screen bottom 40320 ERASCRNTOP$ = E$+"[1J" 'erase from cursor to screen top 40330 DEF FNSETSROLL$(TOP,BOTTOM) = E$+"["+RIGHT$(STR$(TOP),LEN(STR$(TOP))-1)+ ";"+RIGHT$(STR$(BOTTOM),LEN(STR$(BOTTOM))-1)+ "r" 'set scrolling region, TOP,BOTTOM 40340 DEF FNCURUP$(N) = E$+"["+RIGHT$(STR$(N),LEN(STR$(N))-1)+"A" 'cursor up N lines 40350 DEF FNCURDOWN$(N) = E$+"["+RIGHT$(STR$(N),LEN(STR$(N))-1)+"B" 'cursor down N lines 40360 DEF FNCURRIGHT$(N) = E$+"["+RIGHT$(STR$(N),LEN(STR$(N))-1)+"C" 'cursor right N spaces 40370 DEF FNCURLEFT$(N) = E$+"["+RIGHT$(STR$(N),LEN(STR$(N))-1)+"D" 'cursor left N spaces 40380 DEF FNPOSC$(X,Y) = E$+"["+ RIGHT$(STR$(X),LEN(STR$(X))-1)+";"+ RIGHT$(STR$(Y),LEN(STR$(Y))-1)+"H" 'position cursor 40390 RETURN C$(X,Y) = E$+"["+ RIGHT$(STR$(X),LEN(STR$(X))-1)+";"+ RIGHT$(STR$(Y),LEN(STR$(Y))-1)+"H" 'position cursor 40390 RETURN