!======================================================================== !************************************************************************ !************************************************************************ !************** **************** !************ DEFINED VARIABLES ************** !************** **************** !************************************************************************ !************************************************************************ ! ************************ EXTERNAL VARIABLES ****************************** %INCLUDE "$JPIDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB" %INCLUDE "$DVIDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB" %INCLUDE "$SMGDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB" %INCLUDE "$SSDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB" %INCLUDE "$SYIDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB" %INCLUDE "$UAIDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB" %INCLUDE "$LIBDTDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB" !****************************** assign boolean equivalence to true and false DECLARE INTEGER CONSTANT TRUE = -1, FALSE = 0 DECLARE LONG CONSTANT FLAGS = 17, DEF_VAL = 4 DECLARE LONG ret_status DECLARE STRING chosen, data_string, menu_title, border_text, char_string DECLARE STRING status_line DECLARE LONG pasteboard_id, display_id, display_id(20%), keyboard_id, & cur_display_id, fst_display_id, lst_display_id, menu_offset, & display_height, display_width, display_row, display_col DECLARE WORD number DECLARE INTEGER display_cnt DECLARE LONG DEC_NUM DECLARE STRING HEX_NUM, BI_NUM, OCT_NUM DECLARE STRING DATA_ARRAY$(20%) DECLARE INTEGER cnt MAP (menu_list) STRING menu_choice(50) = 20 !*********************************************** valid month table MONTHS$="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC" !************************************************* valid day table DAYS$="031029031030031030031031030031030031" !************************************************* valid hex table HEX_DIG$="0123456789ABCDEF" !hex digits !***************************************** valid listener address table TODAY$ = EDIT$(DATE$(0),32) !todays date DD-MMM-YY CALL LIB$DATE_TIME(NOW$) !todays date DD-MMM-YYYY HH:MM:SS.00.00 CUR_MONTH$ = MID$(NOW$,4,3) !this month MMM CUR_YEAR$ = MID$(NOW$,8,4) !this year YYYY FMFD$ = CHR$(12) !printer form feed - to top of next page CR$ = CHR$(13) !carrage return CRLF$ = CHR$(13)+CHR$(10) !carrage return & line feed BLK$ = ESC+"[5m" !'blinking text' command BNK$ = ESC+"[5m" !'blink char' BOLD$ = ESC+"[1m" !'bold video' command UNDL$ = ESC+"[4m" !'under line video' command INV$ = ESC+"[7m" !'inverse video' command LRG$ = ESC+"#6" !'large type' command NRM$ = ESC+"[0m" !'normal video' command LBOT$ = ESC+"#4" !print double height text (bottom line) LTOP$ = ESC+"#3" !print double height text (top line) SCR$ = ESC+"[12;22r" !set scrolling region line 12 to line 22 NSC$ = ESC+"[r" !clear scrolling region to full screen TRM132$ = ESC+"[?3h" !set terminal to 132 char per line TRM80$ = ESC+"[?3l" !set terminal to 80 char per line GRFON$ = ESC+"(0" !turn graphics on GRFOFF$ = ESC+"(B" !turn graphics off GON$ = ESC+"(0" !turn graphics on GOFF$ = ESC+"(B" !turn graphics off CURSOR_ON$ = ESC+"[?25h" !turn cursor on CURSOR_OFF$ = ESC+"[?25l" !turn cursor off RESET_TERM_H$ = ESC+"c" !hard reset terminal to default state RESET_TERM_S$ = ESC+"[!p" !soft reset terminal to default state CLR_S_CHAR$ = ESC+"P1;1;2{ @"+ESC+"\" !clear soft character set CHAR_OUT$ = ESC + ")1" + SO !shift defined character in CHAR_IN$ = ESC + ")1" + SI !shift defined character out KPADN$ = ESC + ">" !set key pad for nurmeric operation KPADA$ = ESC + "=" !set key pad for application operation SAWRAP_ON$ = ESC + "[?7h" !set screen autowrap on SAWRAP_OFF$ = ESC + "[?7l" !set screen autowrap off C1$ = "'" + STRING$(79,67) !center display (80 char) C2$ = "'" + STRING$(39,67) !center display (40 char) C3$ = "'" + STRING$(131,67) !center display (132 char) C4$ = "'" + STRING$(65,67) !center display (66 char) CLS$ = ESC+"[H"+ESC+"[J" !clear from top down CLS2$ = ESC+"[2H"+ESC+"[J" !clear from line 2 down CLS3$ = ESC+"[3H"+ESC+"[J" !clear from line 3 down CLS5$ = ESC+"[5H"+ESC+"[J" !clear from line 5 down CLL$ = ESC+"[K" !clear from cursor to EOL ERA$ = ESC+"[J" !clear from cursor to EOS ED$ = ESC+"[J" !clear from cursor to eos EL$ = ESC+"[K" !clear from cursor to eol L1$ = ESC+"[1H" !position cursor on line 1 L2$ = ESC+"[2H" !position cursor on line 2 L3$ = ESC+"[3H" !position cursor on line 3 LINE$ = CLL$+CRLF$ L4$ = ESC+"[4H"+LINE$+LINE$+LINE$+LINE$+ESC+"[4H" L5$ = ESC+"[5H" !position cursor on line 5 L6$ = ESC+"[6H" !position cursor on line 6 L7$ = ESC+"[7H" !position cursor on line 7 L8$ = ESC+"[8H" !position cursor on line 8 L9$ = ESC+"[9H" !position cursor on line 9 L10$ = ESC+"[10H" !position cursor on line 10 L11$ = ESC+"[11H" !position cursor on line 11 L12$ = ESC+"[12H" !position cursor on line 12 L13$ = ESC+"[13H" !position cursor on line 13 L14$ = ESC+"[14H" !position cursor on line 14 L15$ = ESC+"[15H" !position cursor on line 15 L16$ = ESC+"[16H" !position cursor on line 16 L17$ = ESC+"[17H" !position cursor on line 17 L18$ = ESC+"[18H" !position cursor on line 18 L19$ = ESC+"[19H" !position cursor on line 19 L20$ = ESC+"[20H" !position cursor on line 20 L21$ = ESC+"[21H" !position cursor on line 21 L22$ = ESC+"[22H" !position cursor on line 22 L23$ = ESC+"[23H" !position cursor on line 23 L24$ = ESC+"[24H" !position cursor on line 24 CMDLN$ = L23$ !position cursor on command line MSGLN$ = L24$ !position cursor on message line UP$ = ESC+"[A" !up arrow DOWN$ = ESC+"[B" !down arrow AT_5$ = ESC+"[5C"+ESC+"[K" !position cursor on column 5 & clear eol AT_10$ = ESC+"[10C"+ESC+"[K" !position cursor on column 10 & clear eol AT_20$ = ESC+"[20C"+ESC+"[K" !position cursor on column 20 & clear eol AT_30$ = ESC+"[30C"+ESC+"[K" !position cursor on column 30 & clear eol AT_40$ = ESC+"[40C"+ESC+"[K" !position cursor on column 40 & clear eol AT_43$ = ESC+"[43C"+ESC+"[K" !position cursor on column 43 & clear eol AT_46$ = ESC+"[46C"+ESC+"[K" !position cursor on column 46 & clear eol AT_50$ = ESC+"[50C"+ESC+"[K" !position cursor on column 50 & clear eol AT_54$ = ESC+"[54C"+ESC+"[K" !position cursor on column 54 & clear eol AT_56$ = ESC+"[56C"+ESC+"[K" !position cursor on column 56 & clear eol AT_60$ = ESC+"[60C"+ESC+"[K" !position cursor on column 60 & clear eol AT_65$ = ESC+"[65C"+ESC+"[K" !position cursor on column 65 & clear eol AT_70$ = ESC+"[70C"+ESC+"[K" !position cursor on column 70 & clear eol AT_80$ = ESC+"[80C"+ESC+"[K" !position cursor on column 80 & clear eol SV$ = ESC+"7" !save the cursor position RS$ = ESC+"8" !restore the cursor position CZ$ = CHR$(26) !control Z DEFAULT$="Y" !default answer for question LABEL$ = PROGID$+" "+VERSION$ LBL_HDR_LEN = LEN(EDIT$(LABEL$,6)) status_line = "Y" !set terminal default to status line (Y)es !************************* END PROGRAM SUPPORT ************************** !************************************************************************ !========================================================================