(8%) + " " & 330 Z$ = SYS(CHR$(6%) + CHR$(-3%)) \ & MAXKB% = ASCII(MID(Z$,3%,1%)) & ! Find the maximum keyboard configured on the system. & 340 BELL$ = CHR$(7%) + CHR$(7%) + CHR$(7%) & 500 ON ERROR GOTO 19000 & 550 Z$ = SYS(CHR$(6%)+CHR$(-7%)) & ! ^C Error trap & 600 OPEN "[1,2] ALARM.VIR" FOR INPUT AS FILE #1% \ & CLOSE #1% & ! Open the file for input to see if it exists. & 610 IF NOT.FOUND% & THEN & Z% = FNCREATE% & ! If the file does not exist then create the file. & 1000 !************************************************************* & ! & ! This ask the user what option they want to take. & ! & 1030 CLOSE #1% & ! Close it just to be safe. & 1050 IF PRIVILEGED$ = "YES" THEN GOTO 6000 & 1100 PRINT CLEAR$ & 1120 PRINT FOR CLR% = 1% TO 6% & 1140 PRINT ,"Your options are:" \ & PRINT & 1160 PRINT ,,"(1) SET THE ALARM" & 1180 PRINT ,,"(2) MODIFY YOUR TIME SETTING" & 1200 PRINT ,,"(3) ABORT YOUR ALARM SETTING" & 1220 PRINT ,,"(4) EXIT THIS PROGRAM" & 1240 PRINT FOR CLR% = 1% TO 3% & 1260 Z$ = SYS(CHR$(11%)) \ & INPUT "What option do you want to take <4>";OPT% & 1280 IF OPT% = 0% THEN OPT% = 4% : GOTO 1350 & 1300 IF OPT% > 0% AND OPT% < 5% THEN GOTO 1350 & 1320 PRINT BELL$ \ & PRINT "OPTIONS ARE (1 thru 4)" \ & SLEEP 3 \ & GOTO 1000 & 1350 ON OPT% GOSUB 2000, 3000, 4000, 5000 & 1360 IF GETOUT% & THEN & GOSUB 5000 & 1380 GOTO 1000 & 2000 !************************************************************** & ! & ! This takes care of the SET-TIME option. & ! & 2020 NAME1$ = FNNAME$ & ! Input the name through a function. & 2040 ALARMTIM1$ = FNTIME$ & ! Input the time through a function. & 2050 IF DEFAULT$ = "YES" & THEN & ALARMTIM1$ = FNDEFAULT$(ALARMTIM1$) & ! If the DEFAULT flag is set then the default & ! extension for the time is given. & 2060 REASON1$ = FNREASON$ & ! Input the reason through a function. & 2080 IF PRIV$ <> "YES" GOTO 2150 & ! This PRIV$ refers to the priviledge to & ! specify which keyboard is to be alarmed. & 2100 KBNUM1% = FNKB% & ! This function inputs the key board number from the user. & 2150 ANSWER$ = FNCONFIRM$ & ! This function returns a "Y" if the user says the & ! information which the user has given is all correct. & 2170 IF ANSWER$ = "Y" & THEN & Z% = FNLOAD%(FNFIND%) & ELSE & PRINT CLEAR$ \ & PRINT FOR CLR% = 1% TO 6% \ & PRINT BELL$ \ & PRINT TAB(22);"Try entering the information again." \ & SLEEP 3% \ & GOTO 2000 & ! If ANSWER$ is "Y" then the information is loaded & ! into the file using FNLOAD%. & ! If ANSWER$ is not "Y" then the user is asked & ! to enter the information again. & 2200 RETURN & ! Go back and give the options again. & 3000 !************************************************************** & ! & ! Modify time setting & ! & 3020 Z$ = FNKEY$ & ! This FUNCTION checks if the user should be allowed & ! MODIFY or CANCEL an alarm setting & 3040 ! & ! This is where you go if the NAME and the KEY match. & ! & 3060 OPEN "[1,2] ALARM.VIR" AS FILE #1% & 3080 OLD.TIME$ = ALARMTIM2$(KEYNUM1%) & 3100 OLD.REASON$ = REASON2$(KEYNUM1%) & 3120 OLD.KBNUM% = KBNUM2%(KEYNUM1%) & 3140 CLOSE #1% & ! Close the file after the values have been given to & ! OLD.TIME$, OLD.REASON$, and OLD.KBNUM%. & 3160 PRINT CLEAR$ & 3180 PRINT FOR CLR% = 1% TO 5% & 3200 PRINT "Do you still want to be alarmed at ";OLD.TIME$; \ & Z$ = SYS(CHR$(11%)) \ & INPUT " ";CNFRM.TIME$ & ALARM BAS[.050021]ALARM .BAS[.050021]    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|bddfINT " ";PART2$ & 4350 IF PART3$ = "" THEN GOTO 4355 ELSE & PRINT " ";PART3$ & 4355 PRINT \ & PRINT " Key Board ..";KBNUM2%(KEYNUM1%) \ & PRINT FOR CLR% = 1% TO 3% \ & PRINT TAB(14);"This ALARM setting will be aborted in five seconds" \ & PRINT & 4357 CLOSE #1% & ! CLOSE after getting the information. & 4360 SLEEP 1% \ PRINT TAB(28);"5....."; & 4365 SLEEP 1% \ PRINT "4...." ; & 4370 SLEEP 1% \ PRINT "3..." ; & 4375 SLEEP 1% \ PRINT "2.." ; & 4380 SLEEP 1% \ PRINT "1." & 4390 OPEN "[1,2] ALARM.VIR" AS FILE #1% & ! OPEN to kill the information. & 4400 NAME2$(KEYNUM1%) = "" & 4440 ALARMTIM2$(KEYNUM1%) = "" & 4460 KBNUM2%(KEYNUM1%) = 0% & 4480 REASON2$(KEYNUM1%) = "" & 4490 CLOSE #1% & ! CLOSE after killing the information. & 4500 PRINT CLEAR$ & ! Clear the screen to tell them the & ! information has been killed. & 4520 PRINT FOR CLR% = 1% TO 8% & 4530 PRINT BELL$ & 4540 PRINT TAB(23);"THE ALARM SETTING HAS BEEN ABORTED" & 4550 PRINT FOR CLR% = 1% TO 10% & 4570 SLEEP 5% & 4600 RETURN & ! Go back and give the options again. & 5000 !************************************************************** & ! & ! This is the way out of this program. & ! & 5010 PRINT CLEAR$ & 5020 PRINT FOR CLR% = 1% TO 3% & 5030 PRINT "Finished ";TIME$(0%) \ & PRINT & 5040 Z$ = SYS(CHR$(9%)) & ! Exit and clear the program. & 5060 GOTO 32767 & 5080 RETURN & 6000 !************************************************************* & ! & ! This asks a privileged user what option they want to take. & ! & 6030 CLOSE #1% & ! Close it just to be safe. & 6100 PRINT CLEAR$ & 6120 PRINT FOR CLR% = 1% TO 5% & 6140 PRINT ,"Your options are:" \ & PRINT & 6160 PRINT ,,"(1) SET THE ALARM" & 6180 PRINT ,,"(2) MODIFY YOUR TIME SETTING" & 6200 PRINT ,,"(3) ABORT YOUR ALARM SETTING" & 6220 PRINT ,,"(4) EXIT THIS PROGRAM" & 6230 PRINT ,,"(5) LOOK AT THE EXISTING ALARM SETTINGS" & 6235 PRINT ,,"(6) CLEAR ALL THE ALARM SETTINGS" & 6240 PRINT FOR CLR% = 1% TO 3% & 6260 Z$ = SYS(CHR$(11%)) \ & INPUT "What option do you want to take <4>";OPT% & 6280 IF OPT% = 0% THEN OPT% = 4% : GOTO 6350 & 6300 IF OPT% > 0% AND OPT% < 7% THEN GOTO 6350 & 6320 PRINT BELL$ \ & PRINT "OPTIONS ARE (1 thru 6)" \ & SLEEP 3 \ & GOTO 6000 & 6350 ON OPT% GOSUB 2000, 3000, 4000, 5000, 7000, 8000 & 6380 GOTO 6000 & 7000 !************************************************************** & ! & ! This takes care of the LOOK AT ALARM SETTINGS option. & ! & 7020 PRINT CLEAR$ \ & PRINT FOR CLR% = 1% TO 5% & 7040 OPEN "[1,2] ALARM.VIR" AS FILE #1% & 7060 FOUND% = 0% & ! Set the FOUND% flag to 0%. & 7080 FOR PRNT% = 1% TO NUM.OF.PLACES% & 7090 IF NAME2$(PRNT%) = "" THEN GOTO 7160 & 7100 Z$ = FNCVT$(REASON2$(PRNT%)) & ! Make three parts out of the reason. & ! The parts are PART1$, PART2$ and PART3$. & 7120 PRINT " Key number....";PRNT% \ & PRINT " Name...............";NAME2$(PRNT%) \ & PRINT " Alarm time.........";ALARMTIM2$(PRNT%) \ & PRINT " Keyboard number....";KBNUM2%(PRNT%) \ & PRINT " Reason.............";PART1$ \ & IF PART2$ = "" THEN GOTO 7135 ELSE & PRINT " ";PART2$ & 7130 IF PART3$ = "" THEN GOTO 7135 ELSE & PRINT " ";PART3$ & 7135 PRINT FOR CLR% = 1% TO 2% & 7140 FOUND% = 1% & ! If something is found then FOUND% flag is set to 1%. & 7160 NEXT PRNT% & 7170 CLOSE #1% & 7180 IF FOUND% = 0% & THEN ALARM BAS[.050021]ALARM .BAS[.050021]    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|bddfN$ + " " & ! This put a space at the end to define the end of the string. & 12820 LONG% = LEN(REASON$) & ! Find the length. The length determines how many & ! whole parts can be made out of the reason. & 12830 IF LONG% <= 43% GOTO 12870 & 12840 IF LONG% <= 85% GOTO 12860 & 12850 POSIT1% = INSTR(43%,REASON$," ") \ & POSIT2% = INSTR(85%,REASON$," ") \ & PART1$ = LEFT(REASON$,POSIT1%) \ & PART2$ = MID(REASON$,POSIT1% + 1%,POSIT2% - POSIT1%) \ & PART3$ = RIGHT(REASON$,POSIT2% + 1%) \ & GOTO 12880 & ! This gives three parts. & 12860 POSIT1% = INSTR(43%,REASON$," ") \ & PART1$ = LEFT(REASON$,POSIT1%) \ & PART2$ = RIGHT(REASON$,POSIT1% + 1%) \ & PART3$ = "" \ & GOTO 12880 & ! This gives two parts. & 12870 PART1$ = REASON$ \ & PART2$ = "" \ & PART3$ = "" & ! This gives one part. & 12880 FNCVT$ = REASON$ & 12890 FNEND & 13000 ! & ! This FUNCTION controls the format of the time input & ! by the user. It sets the default for AM and PM to & ! the next occurance of the time input by the user. & ! & 13020 DEF FNTIME$ & 13050 PRINT CLEAR$ & 13060 DEFAULT$ = "" & 13070 AM.PM$ = "" & 13120 PRINT FOR CLR% = 1% TO 5% & 13140 PRINT "The present time is ";TIME$(0%) \ & PRINT \ & Z$ = SYS(CHR$(11%)) \ & INPUT " What time do you want the alarm to sound ";ALARMTIM1$ \ & ALARMTIM1$ = CVT$$(ALARMTIM1$, 2% + 32%) & 13160 IF INSTR(1%,ALARMTIM1$,"NOON") > 0% & THEN & FNTIME$ = "12:00 NOON" \ & GOTO 13500 & ! If the user entered "NOON" then the correct value is & ! given to FNTIME$ and then the function is terminated. & 13180 IF INSTR(1%,ALARMTIM1$,"MIDNIGHT") > 0% & THEN & FNTIME$ = "12:00 MIDNIGHT" \ & GOTO 13500 & ! If the user entered "MIDNIGHT" then the correct value is & ! given to FNTIME$ and then the function is terminated. & 13200 COLON% = INSTR(1%,ALARMTIM1$,":") & ! Find the colon in the time string. & 13220 IF COLON% = 0% & THEN & PRINT BELL$ \ & PRINT TAB(16); \ & PRINT "Use a colon (:) between the hour and the minutes." \ & SLEEP 3% \ & PRINT CLEAR$ \ & GOTO 13050 & ! If a colon is not found then the user is told to use one. & 13240 AM% = INSTR(1%,ALARMTIM1$,"AM") & 13260 PM% = INSTR(1%,ALARMTIM1$,"PM") & 13280 IF AM% > 0% THEN AM.PM$ = " AM" \ AM.PM% = AM% & 13300 IF PM% > 0% THEN AM.PM$ = " PM" \ AM.PM% = PM% & 13320 HOUR$ = LEFT(ALARMTIM1$,COLON% - 1%) & ! Put the value of the hour in a string. & 13340 IF AM.PM$ = "" & THEN & MINUTES$ = RIGHT(ALARMTIM1$,COLON% + 1%) & ELSE & MINUTES$ = RIGHT(LEFT(ALARMTIM1$,(AM.PM%-1%)), & (INSTR(1%,ALARMTIM1$,":")+1%)) & ! Put the value of the minutes in a string. & 13360 MINUTES% = VAL(MINUTES$) \ & HOUR% = VAL(HOUR$) \ & MINUTES$ = NUM1$(MINUTES%) \ & HOUR$ = NUM1$(HOUR%) & ! This gets integer values of the strings which have the & ! hour and the minutes. The integer is then turned back & ! into a string so that if the string value was "" , the & ! string values will have at least a "0". & 13380 IF HOUR% > 12% AND HOUR% < 25% & THEN & PRINT BELL$ \ & PRINT TAB(20);" Military time is not allowed." \ & PRINT TAB(20);"Input an hour between 1 and 12, not";HOUR%"." \ & SLEEP 3% \ & PRINT CLEAR$ \ & GOTO 13050 & ! Check the size of HOUR% (must be between 1 and 12) & 13400 IF HOUR% > 12% OR HOUR% < 1% & THEN & PRINT BELL$ \ & PRINT TAB(18);"Input an hour between 1 and 12, not";HOUR%"." \ & SLEEP 3% \ & PRINT CLEAR$ ALARM BAS[.050021]ALARM .BAS[.050021]    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 TTIME$ + AM.PM$ & ! Put the final string together. & 13950 FNEND & 14000 ! & ! This loads the information into the VIRTUAL ARRAY. & ! & 14010 DEF FNLOAD%(POINT%) & 14040 KEYNUM1% = POINT% & ! Give the value to KEYNUM1% because it is used & ! to tell the user what his/her keynumber is. & 14060 OPEN "[1,2] ALARM.VIR" AS FILE #1% & ! OPEN the file in order to load some information. & 14080 NAME2$(POINT%) = NAME1$ & 14100 ALARMTIM2$(POINT%) = ALARMTIM1$ & 14120 KBNUM2%(POINT%) = KBNUM1% & 14140 REASON2$(POINT%) = REASON1$ & 14160 CLOSE #1% & ! CLOSE the file after loading the information. & 14200 ! & ! Tell the User his/her KEY NUMBER (KEYNUM1%) & ! & 14220 PRINT CLEAR$ & 14240 PRINT FOR CLR% = 1% TO 5% & 14260 PRINT ," If you want to cancel or modify your alarm" \ & PRINT \ & PRINT ,"setting you will be asked for a number this" \ & PRINT \ & PRINT ,"number is your KEY." \ & PRINT FOR CLR% = 1% TO 4% \ & PRINT ,,"Your KEY NUMBER is ";KEYNUM1% \ & PRINT FOR CLR% = 1% TO 4% & 14280 Z$ = SYS(CHR$(11%)) \ & INPUT "Hit to exit this program";RTN$ \ & GETOUT% = -1% & ! GETOUT$ tells the subroutine option to exit the program. & 14300 FNEND & 14500 ! & ! This function find the next available & ! space in the virtual array & ! & 14520 DEF FNFIND% & 14540 FNFIND% = -1 & ! If the value returned by the function is -1 then & ! you know there is a problem in this function & 14560 PLACE% = 1% & ! Set the place counter. This keeps track of the & ! positions which already contain information. & 14570 OPEN "[1,2] ALARM.VIR" AS FILE #1% & 14580 UNTIL KBNUM2%(PLACE%) = 0% & ! This will keep looping until an available space is & ! found in the virtual array file. & 14600 PLACE% = PLACE% + 1 & ! Increment the place counter. & 14620 IF PLACE% - 1% = NUM.OF.PLACES% THEN DUMMY% = FNEXIT% & ! If the Virtual Array ever gets filled the program & ! will execute an EMERGENCY EXIT function. & 14640 NEXT & ! Go back to the UNTIL statement. & 14650 CLOSE #1% & 14660 FNFIND% = PLACE% & ! PLACE% is the place that has space. & 14680 FNEND & 15000 ! & ! This function returns a "Y" if the user says & ! the information is correct. & ! & 15010 DEF FNCONFIRM$ & 15020 PRINT CLEAR$ \ & PRINT FOR CLR% = 1% TO 6% & 15030 IF KBNUM1% = KBNUMSAVE% & THEN & KEYBOARDINFO$ = "on this keyboard." & ELSE & KEYBOARDINFO$ = "on keyboard number"+NUM$(KBNUM1%)+"." & 15050 PRINT " ";NAME1$;" will be alarmed ";KEYBOARDINFO$ & 15060 PRINT FOR CLR% = 1% TO 2% & 15070 PRINT " You will be alarmed at ";ALARMTIM1$ & 15080 PRINT FOR CLR% = 1% TO 2% & 15090 Z$ = FNCVT$(REASON1$) & ! Make three parts out of the reason. & ! The parts are PART1$, PART2$ and PART3$. & 15100 PRINT " Reason: ";PART1$ \ & IF PART2$ = "" THEN GOTO 15120 ELSE & PRINT " ";PART2$ & ! Print PART2$ only if it has a piece of the reason. & 15110 IF PART3$ = "" THEN GOTO 15120 ELSE & PRINT " ";PART3$ & ! Print PART3$ only if it has a piece of the reason. & 15120 PRINT FOR CLR% = 1% TO 3% & 15140 INPUT "Is this the correct information ";CONFIRM$ & ! Ask if the info is correct. & 15160 CONFIRM$ = CVT$$(CONFIRM$,32%) \ & CONFIRM$ = LEFT(CONFIRM$,1%) & 15170 IF CONFIRM$ <> "N" & THEN & CONFIRM$ = "Y" & ELSE & CONFIRM$ = "N" & 15180 FNCONFIRM$ = CONFIRM$ & 15200 FNEND & 15500 ! & ! This FUNCTION decides if the user may be allowed & ! to MODIFY or CANCEL an alarm seALARM BAS[.050021]ALARM .BAS[.050021]    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(CLR%) = "" & 16700 NEXT CLR% & 16720 CLOSE #1% & 16740 FNEND & 19000 !************************************************************** & ! & ! ERROR ROUTINE & ! & 19010 ! * * * * * * * & ! Expected Errors WITHOUT error line numbers & ! * * * * * * * & 19015 ! ^C error \ & IF ERR = 28 & THEN & Z$ = SYS(CHR$(6%)+CHR$(-7%)) \ & CLOSE #1% \ & RESUME 500 & 19020 ! ^Z error \ & IF ERR = 11 & THEN & CLOSE #1% \ & RESUME 500 & 19030 ! ?Line too long \ & IF ERR = 47 & THEN & PRINT FOR CLR% = 1% TO 3% \ & PRINT BELL$ \ & PRINT BELL$;"?Line too long" \ & SLEEP 3% \ & PRINT CLEAR$ \ & PRINT FOR CLR% = 1% TO 5% \ & RESUME & 19040 IF ERR = 10 AND PRO.COUNT% < 100% & THEN & PRO.COUNT% = PRO.COUNT% + 1% \ & SLEEP 1% \ & RESUME & ! Stall the program for a second when a protection violation & ! error is generated. A protection violation error will be & ! generated when two jobs try to access the same block in & ! the ALARM.VIR file. To avoid an infinite loop this error & ! trap allows only 100 of these errors. & 19100 ! * * * * * * * & ! Expected Errors WITH error line numbers & ! * * * * * * * & 19110 ! %Data format error \ & IF ERR = 50 AND ERL = 1260 & THEN & PRINT \ & PRINT BELL$;"OPTIONS ARE (1 TO 4)" \ & SLEEP 3% \ & RESUME 1100 & 19120 ! %Data format error \ & IF ERR = 50 AND ERL = 6260 & THEN & PRINT \ & PRINT BELL$;"OPTIONS ARE (1 TO 6)" \ & SLEEP 3% \ & RESUME 6100 & 19130 ! %Data format error \ & IF ERR = 50 AND ERL = 15600 & THEN & RESUME 15800 & 19140 ! %Integer error \ & IF ERR = 51 AND ERL = 16300 & THEN & RESUME 16350 & 19150 ! ?Illegal number \ & IF ERR = 52 AND ERL = 15600 & THEN & RESUME 15800 & 19160 ! ?Illegal number \ & IF ERR = 52 AND ERL = 1260 & THEN & PRINT \ & PRINT BELL$;"OPTIONS ARE (1 TO 4)" \ & SLEEP 3% \ & RESUME 1100 & 19170 ! ?Illegal number \ & IF ERR = 52 AND ERL = 6260 & THEN & PRINT \ & PRINT BELL$;"OPTIONS ARE (1 TO 6)" \ & SLEEP 3% \ & RESUME 6100 & 19180 ! ?Can't find file or account \ & IF ERR = 5 AND ERL = 600 & THEN & NOT.FOUND% = -1% \ & RESUME 610 & ! Can't find the ALARM.VIR file when opened for input. & 19300 ! * * * * * * * & ! Unexpected errors WITH error line numbers & ! * * * * * * * & 19310 IF ERL = 13360 & THEN & PRINT \ & PRINT BELL$;"?Illegal time" \ & SLEEP 3% \ & RESUME 13050 & 19980 ! * * * * * * * & ! Unexpected errors & ! * * * * * * * & 19985 Z$ = SYS(CHR$(6%)+CHR$(9%)+CHR$(ERR)) & 19990 ERROR$ = RIGHT(Z$,3%) & 19995 PRINT BELL$ \ & PRINT " Oh no !! Not another "; ERROR$ \ & PRINT " at line";ERL;"in program ALARM !!" & 19999 GOTO 32767 & 31000 !************************************************************** & ! & ! (((( EMERGENCY EXIT )))) & ! & 31010 DEF FNEXIT% & 31020 ESCAPE% = 0% & 31030 PRINT CLEAR$ & 31035 ON ERROR GO TO 31250 & 31040 OPEN "KB:" AS FILE #1%, MODE 16% & ! Mode 16 to disable ^C. & 31050 Z$ = SYS(CHR$(3%) + CHR$(1%)) \ & Z$ = SYS(CHR$(11%) + CHR$(1%)) & ! Cancel the echo and type ahead. & 31120 PRINT #1% FOR CLR% = 1% TO 3% & 31130 PRINT #1% BELL$ & 31140 PRINALARM BAS[.050021]ALARM .BAS[.050021]    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|bddfT #1% TAB(6);"(((( Sorry there is no room left "; \ & PRINT #1% "for you in the Alarm file ))))" & 31145 S$ = TAB(10) & ! S$ was set in order to save space on the screen. & 31150 PRINT #1% & \ PRINT #1% & \ PRINT #1% S$;"Hello, I am David (Erasmo David Rosales). I am the author" & \ PRINT #1% & \ PRINT #1% S$;" of this program. When I wrote this program, I didn't" & \ PRINT #1% & \ PRINT #1% S$;" expect this program to have such a great demand." & \ PRINT #1% & \ PRINT #1% S$;" So, I only allocated space for fifty people," & \ PRINT #1% & \ PRINT #1% S$;" who can't keep track of time." & \ PRINT #1% & \ PRINT #1% S$;"Please inform the computer center manager of this problem." & \ PRINT #1% FOR CLR% = 1% TO 2% & 31200 INPUT #1%, FREEZE$ & 31210 ESCAPE% = ESCAPE% + 1% & 31220 IF ESCAPE% >= 30% & THEN & Z$ = SYS(CHR$(2%) + CHR$(1%)) \ & CLOSE #1% \ & GOTO 32767 & ! Return the echo and then exit the program. & 31230 IF CVT$$(FREEZE$,32%) = "ERASMO DAVID ROSALES" & THEN & Z$ = SYS(CHR$(2%) + CHR$(1%)) \ & CLOSE #1% \ & GOTO 32767 & ! Return the echo and then exit the program. & 31240 GOTO 31030 & 31250 ! Error routine for FNEXIT% & 31260 IF ERR > 0% THEN RESUME 31030 & ! On any error go to the begining of this function. & 31300 FNEND & 32767 END