XTEND' & \ GOTO 2000 IF TIME(0%) / 60% >= TOOLONG & \ PRINT #1%, CHR$(7%); & \ GOTO 160 & ! The main loop. Check to see what's happening every & ! 20 seconds to see if time's up, updating the time left. & ! If someone typed 'EXTEND' they start a new 10 minutes. & ! Beep if a miscue. & 170 IF TOOLONG <= TIME(0%) / 60% & THEN GOTO 2000 & ELSE GOSUB 3000 & \ GOTO 160 & ! Wait error in the previous line. Update the time left. & ! If over 10 minutes, log the turkey out. & 1000 CLOSE #1% & \ Z$ = SYS(CHR$(2%)) & \ Z$ = SYS(CHR$(9%)) & !Close the KB:, resume echo, and end clearing this program & 2000 PRINT #1%, FNMOVE$(18%, 17%); ' Protection time expired ...'; & \ PRINT #1%, SPACE$(79% - POS(0%)) & ! Tell them protection ends & 2010 Z$ = SYS(CHR$(2%) + CHR$(1%)) & \ Z$ = SYS(CHR$(6%) + CHR$(5%) + CVT%$(SWAP%(2%))) & \ GOTO 32767 & ! Log them out, ignoring quota & 3000 ! U P D A T E T I M E L E F T & 3010 TIM = TOOLONG - TIME(0%) / 60% & \ MINUTES.REMAINING% = TIM & \ SECONDS.REMAINING% = (TIM - MINUTES.REMAINING%) * 60% & \ PRINT #1%, FNMOVE$(18%, 17%); 'Protection will expire in'; & \ GOTO 3020 UNLESS MINUTES.REMAINING% & \ PRINT #1%, MINUTES.REMAINING%;'minute'; & \ PRINT #1%, 's'; UNLESS MINUTES.REMAINING% < 2% & ! Calculate minutes, seconds left and print minutes & ! if necessary & 3020 GOTO 3030 UNLESS SECONDS.REMAINING% & \ PRINT #1%, SECONDS.REMAINING%;'second'; & \ PRINT #1%, 's '; UNLESS SECONDS.REMAINING% < 2% & ! Print seconds, if necessary & 3030 PRINT #1%, SPACE$(79% - POS(0%)) & \ RETURN & ! Clear to end of line and return & 9000 ! E R R O R H A N D L I N G R O U T I N E & 9010 IF ERR = 15 AND ERL = 160 & THEN GUESS$ = '' & \ RESUME 170 & ! KB Wait expired. Don't do anything but return to check & ! for time & 9020 IF ERR = 15 AND ERL = 20050 & THEN LSI% = -1% & \ FNKB% = -1% & \ RESUME 20090 & ! No response from keyboard in FNKB%, must be an LSI & ! or decwriter & 9030 IF ERL <= 110 & THEN RESUME 1000 & ELSE RESUME 160 & ! The only expected errors should occur in the main loop & ! (such things as ^Zs and such, so return them to the loop & ! unless they ^Z before they type in a password, in which & ! we release them & 20000 DEF* FNKB% & ! This function is a modified version of the standard Whittier & ! College FNKB%. Instead of returning values 0% thru 5% and & ! remembering what each stands for, all terminals in VT52 mode & ! are changed to ANSII mode, thus all we need to is what type & ! of terminal it is. The variables meant to be local to this & ! function have the prefix FUNC.KB. . The variables meant to & ! be global (the actual values to be returned) are boolean and & ! are as follows: & ! & ! LSI% if keyboard is an LSI or Decwriter & ! GIGI% if keyboard is a GIGI & ! VT100% if keyboard is a VT100 or Visual 100 & ! VT125% if keyboard is a VT125 & ! & ! FNKB% is true if one of the above was determined, else FNKB% & ! is false. The keyboard is opened on channel 12, so either it & ! it should be left available for this function or change the & ! channel of this function. & 20010 LSI% = 0% & \ GIGI% = 0% & \ VT100% = 0% & \ VT125% = 0% & \ FNKB% = 0% & ! Initialize everything to false & 20030 FUNC.KB.Z$ = SYS(CHR$(11%)) + SYS(CHR$(3%)) & \ WAIT 4% & \ OPEN 'KB:' AS FILE #12%, MODE 8% & \ PRINT #12%, CHR$(155%);'<' & ! Cancel the type ahead and echo on this keyboard. Wait & ! a few seconds then open them up in ANSII. & 20040 PRINT #12%, CHR$(155%);'Z'; & \ PRINT #12%, RECORD 256%, CHR$(128% + 3%); & ! Send out the interrogationPROTECBAS[.050020]PROTEC.BAS[.050020]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddf code. & 20050 UNTIL INSTR(1%, FUNC.KB.REST.OF.RESP$, 'c') & \ PRINT #12%, RECORD 256%, CHR$(128% + 1%); & \ GET #12% & \ FIELD #12%, 1% AS FUNC.KB.1ST.RESP.CHAR$ & \ FUNC.KB.REST.OF.RESP$ = FUNC.KB.REST.OF.RESP$ + FUNC.KB.1ST.RESP.CHAR$ & \ NEXT & ! Keep looking in the buffer until we get a response. & 20060 IF INSTR(1%, FUNC.KB.REST.OF.RESP$, '?5') <> 0% & THEN FNKB% = -1% & \ GIGI% = -1% & \ GOTO 20090 & ! Keyboard is a GIGI & 20070 IF INSTR(1%, FUNC.KB.REST.OF.RESP$, '?12') <> 0% & THEN FNKB% = -1% & \ VT125% = -1% & \ GOTO 20090 & ! Keyboard is a VT125 & 20080 IF INSTR(1%, FUNC.KB.REST.OF.RESP$, '?1') <> 0% & THEN FNKB% = -1% & \ VT100% = -1% & \ GOTO 20090 & ! Keyboard is a VT100 & 20090 WAIT 0% & \ FUNC.KB.Z$ = SYS(CHR$(11%)+CHR$(12%)) & \ CLOSE #12% & \ FUNC.KB.Z$ = SYS(CHR$(2%)) & ! Kill the wait, reenable type ahead, close the channel, & ! and reset to echo . & 20100 FNEND & ! End of FNKB% & 21000 DEF* FNMOVE$(ROW%, COLUMN%) & ! The cursor control function. It is assumed that the & ! keyboard type is known and is designated as LSI%, GIGI%, & ! VT100%, or VT125% and is in ANSII mode & 21010 IF LSI% & THEN FNMOVE$ = CHR$(155%) + '=' + CHR$(ROW% + 31%) & + CHR$(COLUMN% + 31%) & ELSE FNMOVE$ = CHR$(155%) + '[' + NUM1$(ROW%) + ';' & + NUM1$(COLUMN%) + 'H' & 21020 FNEND & ! End of FNMOVE$ & 32767 END &