DIR SY:* RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .DIR XM1: 0 Files, 0 Blocks 1778 Free blocks .DIR XM1:* 0 Files, 0 Blocks 1778 Free blocks .DIR XM2:* ?DIR-F-Error reading directory .DATE ?KMON-W-No date .DIR/FULL SY:* RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .TYPE Files? STARTS.COM ?PIP-F-File not found DK:STARTS.COM .TYPE Files? SY:STARTS.COM SET TT SCOPE SET TT NOCRLF SET EDIT KED SET USR NOSWAP SET EXIT NOSWAP ASSIGN SY: CNF: R TSTPBS XM4:TEST.COM/D ASSIGN XM4: DK: R TSTPBS XM4:TEST.COM/I INIT XM4:/NOQUERY R TSTPBS XM1:TEST.COM/D ASSIGN XM1: DK: R TSTPBS XM1:TEST.COM/I INIT XM1:/NOQUERY R TSTPBS XM1:START.COM/C R TSTPBS XM2:START.COM/C R TSTPBS XM3:START.COM/C R TSTPBS XM4:START.COM/C R IOBAS .DIR SY:* RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .TYPE SY:CONFIG.CNF x}Xu\ `?xxu| b?xxu|a?x8uu<c?e?g?i?k?m?o?ttttt t tttttttt .DIR SY: RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .TYPE Files? SY:EPROM.BAS 10 REM EPROM.BAS Edit level 3 20 PRINT "ADAC BASYS PROM Programming Utility V2.1" \ PRINT 30 DIM hex$(255) 40 DIM #1%,device%(2.00000E+06) 50 REM compute the hex numbers for the digits 0 to 255 60 h$ = '0123456789ABCDEF' 70 FOR hex1% = 1 TO 16 80 FOR hex0% = 1 TO 16 90 i% = (hex1% - 1%) * 16 + hex0% - 1 100 hex$(i%) = SEG$(h$,hex1%,hex1%) + SEG$(h$,hex0%,hex0%) 110 NEXT hex0% 120 NEXT hex1% 130 h$ = '' 140 PRINT '1. Enter the device name to be burned into PROM'; 150 INPUT device_name$ 160 OPEN device_name$ FOR INPUT AS FILE #1% 165 block_size = 256 170 block = 6 * block_size \ i = block \ num_seg% = device%(i) 180 IF num_seg% > 31 THEN 330 190 IF num_seg% < 1 THEN 330 200 next_seg% = device%(i + 1%) 205 IF next_seg% = 0% THEN last% = 1% 210 IF next_seg% < 0 THEN 330 220 IF next_seg% > num_seg% THEN 330 230 extra_bytes% = device%(i + 3%) 240 IF extra_bytes% > 100 THEN 330 270 seg% = 0% 280 device_length = device%(i + 4) \ i = i + 5 290 IF device%(i) = 2048% THEN 315 300 device_length = device_length + device%(i + 4) 305 IF device%(i) <> 512% THEN total_size = device_length 310 i = i + 7 + extra_bytes% \ GO TO 290 315 IF last% = 1% THEN 350 316 block = block + 2 * block_size \ i = block \ next_seg% = device%(i + 1) 317 IF next_seg% = 0% THEN last% = 1% 318 extra_bytes% = device%(i + 3%) 320 i = i + 5 \ GO TO 290 330 PRINT '2. Bad directory, please enter device length in blocks'; 340 INPUT total_size 350 words = total_size * 256% 360 PRINT '3. Enter the serial line number of PROM programmer'; 370 INPUT port% 380 PRINT '4. Enter the PROM type (2716, 2732, 2764, 27128, 27256)'; 390 INPUT prom_type% 392 IF prom_type% = 2716% THEN prom_length = 2048 \ p$ = '00' \ GO TO 460 394 IF prom_type% = 2732% THEN prom_length = 4096 \ p$ = '10' \ GO TO 460 400 IF prom_type% = 2764% THEN prom_length = 8192\ p$ = 'B0' \ GO TO 460 410 IF prom_type% = 27128% THEN prom_length = 16384 \ p$ = 'B4' \ GO TO 460 420 IF prom_type% = 27256% THEN prom_length = 32768 \ p$ = 'B6' \ GO TO 460 430 PRINT '?ERROR - Unknown PROM type' \ GO TO 380 440 CHAR_IN(prom%,s$) 450 IF s$ <> '' THEN 440 460 PRINT @port%,p$ + '@' 470 CHAR_IN(port%,b%) 480 IF b% = ASC('F') THEN PRINT '?ERROR - Bad PROM code' \ GO TO 380 490 IF b% = ASC('>') THEN 510 500 GO TO 470 510 prom_number% = 2 * (INT(words / prom_length + .999999)) 520 PRINT USING 'You will need ## PROMs to burn this device',prom_number% 530 PRINT 535 PRINT '5. Enter the socket number you wish to burn (zero to stop)'; 540 INPUT socket% 550 IF socket% = 0% THEN 1180 560 IF socket% < 9% THEN start_word = (socket% - 1) * prom_length 570 IF socket% >= 9% THEN start_word = (socket% - 9%) * prom_length 580 IF start_word < words GO TO 600 590 PRINT '?ERROR - Starting address outside device' \ GO TO 530 600 PRINT 'Insert a ';STR$(prom_type%);' PROM and type '; 610 INPUT h$ 620 CHAR_IN(port%,s$) 630 IF s$ <> '' THEN 620 640 PRINT @port%,'B' 650 TIME_OUT(1,25,error) 660 CHAR_IN(port%,b%) 670 IF b% = ASC('>') THEN 710 680 IF b% = ASC('F') THEN PRINT '?ERROR - PROM not erased' \ GO TO 600 690 IF error = 1 THEN PRINT '?ERROR - Programmer not responding' \ GO TO 600 700 GO TO 660 710 PRINT @port%,'I' 720 WAIT(1%) 730 prom_add% = 0% 740 end_word = start_word + prom_length - 16% 750 IF end_word > words THEN end_word = words - 16% 760 CHAR_IN(port%,s$) 770 IF s$ <> '' THEN 760 780 FOR i = start_word TO end_word STEP 16% 790 hex1 = prom_add% / 256% 800 hex0 = prom_add% - 256% * INT(hex1) \ hex1 = INT(hex1) 810 PRINT @port%,':10';hex$(hex1);hex$(hex0);'00'; 820 ck_s = hex1 + hex0 + 16 830 s$ = '' 840 FOR j% = 0% TO 15% 850 n = device%(i + j%) 860 IF n < 0 THEN n = n + 65536 870 IF socket% < 9% THEN n% = INT(n / 256) 880 IF socket% >= 9% THEN n% = n - 256 * INT(n / 256) 890 s$ = s$ + hex$(n%) 900 ck_s = ck_s + n% 910 prom_add% = prom_add% + 1% 920 NEXT j% 930 CHAR_IN(0,x%) 940 IF x% = 63% THEN PRINT 'Loading the PROM programmer' 950 ck_s = 65536 - ck_s 960 ck_s = ck_s - 256% * INT(ck_s / 256%) 970 PRINT @port%,s$;hex$(ck_s) 980 CHAR_IN(port%,b%) 990 IF b% = 70 THEN PRINT '?ERROR - Down line loading aborted' \ GO TO 1180 1000 NEXT i 1010 hex1 = prom_length / 256% 1020 hex0 = prom_length - 256% * INT(hex1) \ hex1 = INT(hex1) 1030 PRINT @port%,':10';hex$(hex1);hex$(hex0);'01'; 1040 ck_s = 0 - (256 * hex1 + hex0 + 17) 1050 CHAR_IN(port%,b%) 1060 IF b% <> ASC('>') THEN 1050 1070 PRINT 1080 PRINT 'Loading of PROM programmer complete' 1090 PRINT @port%,'P' 1100 CHAR_IN(0,b%) 1110 IF b% = 63% THEN PRINT 'Now burning the PROM' 1120 CHAR_IN(port%,b%) 1130 IF b% = ASC('>') THEN 1160 1140 IF b% = ASC('F') THEN PRINT '?ERROR - Programming failure' \ GO TO 1180 1150 GO TO 1100 1160 PRINT CHR$(7);'Programming complete, remove the PROM' 1170 GO TO 530 1180 CLOSE 1190 STOP 1200 END .DIR SY: RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .TYPE Files? SY:TIME ?PIP-F-File not found SY:TIME.LST .$[C ?KMON-F-Invalid command .$[A ?KMON-F-Invalid command .TYPE Files? SY:TIME.BAS 10 REM TIME.BAS -- Edit Level: 20 20 REM 100 SET_WIDTH(250%) 110 DIM s$(10,6),s%(8) 120 RESTORE 130 FOR y% = 0% TO 10% 140 FOR x% = 0% TO 6% 150 READ s$(y%,x%) 160 NEXT x% 170 NEXT y% 180 e$ = CHR$(27%) + "[1;1H" + CHR$(27%) + "[0J" 190 FOR y% = 1% TO 8% \ s%(y%) = 0% \ NEXT y% 220 PRINT e$ + e$ 230 s%(0%) = 1% \ c$ = CLK$ 240 a$ = CLK$ \ b$ = "" 241 IF SEG$(a$,1,2) = SEG$(c$,1,2) THEN 250 243 c% = VAL(SEG$(a$,1,2)) \ IF c% > 12 THEN c% = c% - 12 250 FOR y% = 0% TO 6% 260 FOR x% = 1% TO 8% 270 a% = ASC(SEG$(a$,x%,x%)) 280 IF s%(x%) = a% THEN 370 290 IF s%(x% - 1%) = 0% THEN 310 300 b$ = b$ + CHR$(27%) + "[" + STR$(y% + 8%) + ";" + STR$(x% * 6% + 8%) + "H" 310 b$ = b$ + " " + s$(a% - 48%,y%) 320 s%(x%) = 0% 330 IF LEN(b$) < 240% THEN 370 340 s%(x%) = 1% 350 PRINT b$ 360 b$ = "" 370 NEXT x% 380 NEXT y% 390 IF b$ <> "" THEN PRINT b$ 392 IF c% > 0 THEN PRINT CHR$(7%); \ c% = c% - 1 400 FOR y% = 1% TO 8% \ s%(y%) = ASC(SEG$(a$,y%,y%)) \ NEXT y% 430 IF a$ = CLK$ THEN 430 440 c$ = a$ \ GO TO 240 450 DATA " 000 ","0 0","0 00","0 0 0","00 0","0 0"," 000 " 460 DATA " 1 "," 11 "," 1 "," 1 "," 1 "," 1 "," 111 " 470 DATA " 222 ","2 2"," 2"," 2 "," 2 "," 2 ","22222" 480 DATA " 333 ","3 3"," 3"," 3 "," 3","3 3"," 333 " 490 DATA "4 4 ","4 4 ","4 4 ","44444"," 4 "," 4 "," 4 " 500 DATA "55555","5 ","555 "," 5 "," 5","5 5"," 555 " 510 DATA " 666 ","6 ","6 ","6666 ","6 6","6 6"," 666 " 520 DATA "7777 "," 7"," 7"," 7 "," 7 "," 7 ","7 " 530 DATA " 888 ","8 8","8 8"," 888 ","8 8","8 8"," 888 " 540 DATA " 999 ","9 9","9 9"," 9999"," 9"," 9"," 999 " 550 DATA " "," :: "," "," "," "," :: "," " .DIR SY: RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .TYPE Files? SY:CODE.BAS 100 REM CODE.BAS - Edit level: 5 110 REM 140 DIM charray%(26) 150 PRINT "The object of this game is very simple." 160 PRINT "Just type the letters 'ABCDE' in a row." 170 PRINT "See how fast you can do it." 180 PRINT 190 PRINT "Just so it won't be too easy, however, the keyboard" 200 PRINT "has been scrambled up a bit." 210 win_num = 0 220 char_count = 0 230 REM Scramble the alphabet 240 RANDOMIZE 250 FOR count = 1 TO 26 260 temp = INT(26 * RND(0) + 1) 270 FOR check = 1 TO (count - 1) 280 IF temp = charray%(check) - 64 THEN 260 290 NEXT check 300 charray%(count) = temp + 64 310 NEXT count 320 REM 330 PRINT "Get ready" 340 WAIT(3) \ REM Sleep for 3 seconds 350 GET_TIME(start_time) \ REM Record the time 355 DISABLE_CTLC 360 PRINT "GO" 370 PRINT 380 PRINT "* "; 390 REM Wait for character to be typed 400 CHAR_IN(0,char%) 410 IF char% < 0 THEN 400 430 REM We received a character 440 REM 460 IF char% > 127% THEN char% = char% - 128% \ REM Clear high bit 470 IF char% = 3 THEN 810 \ REM Terminate on control-C 480 REM Convert to upper case 490 IF char% > 96 THEN 500 \ GO TO 510 500 IF char% < 123 THEN char% = char% - 32 510 IF char% > 64 THEN 520 \ GO TO 530 520 IF char% < 91 THEN 540 530 PRINT CHR$(char%); \ GO TO 620 540 PRINT CHR$(charray%(char% - 64)); \ REM Print scrambled character 550 REM Check if character is part of winning sequence. 560 IF charray%(char% - 64) = win_num + 65 THEN 600 570 IF charray%(char% - 64) = 65 THEN 590 580 win_num = 0 \ GO TO 620 590 win_num = 1 \ GO TO 620 600 win_num = win_num + 1 610 IF win_num = 5 THEN 660 620 REM 630 char_count = char_count + 1 640 IF char_count > 60 THEN char_count = 0 \ PRINT \ GO TO 380 650 GO TO 390 660 REM 670 REM The string is found 680 PRINT 700 GET_TIME(stop_time) \ REM Record finishing time 710 total_time = stop_time - start_time 720 PRINT 730 PRINT "You found it Ace." 740 PRINT "It took you ";total_time;" seconds." 750 PRINT 760 PRINT "Want to play again"; \ INPUT ques$ 770 x = POS(ques$,"Y",1) + POS(ques$,"y",1) 780 IF x <> 0 THEN 180 790 PRINT 800 PRINT "so long Ace." 810 ENABLE_CTLC 820 END .DIR SY: RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .TYPE Files? SY:CONFIG.BAS 100 REM IOBASIC CONFIGURATION PROGRAM 110 REM 120 REM Edit Level: 30 130 REM 200 date$ = DAT$ 210 PRINT "IOBASIC Configuration Utility V02.0B ";date$ 220 PRINT 400 DIM #2,config%(1791) 500 DIM cbt%(5),cbt_2%(5),rep_count%(5),cbt_size%(5) 1000 REM INITIALIZATION -- DISPLAY HELP AND OPEN CONFIGURATION FILE 1010 space45$ = " " 1500 GOSUB 6500 1600 default_file$ = "CNF:CONFIG.CNF" 1610 config_file$ = default_file$ 1620 GO TO 5200 2000 REM PROMPT FOR COMMAND AND DISPATCH 2010 CANCEL_CTLO 2020 DISABLE_CTLC 2030 prompt$ = "CONFIG> " \ GOSUB 9020 2040 IF CTLC = 1 THEN 2140 2050 IF response$ = "" THEN 2010 2060 temp = LEN(response$) 2070 IF SEG$("EXIT",1,temp) = response$ THEN 32000 2080 IF SEG$("HELP",1,temp) = response$ THEN 6000 2090 IF SEG$("OPEN",1,temp) = response$ THEN 5010 2100 IF SEG$("SAVE",1,temp) = response$ THEN 7010 2102 IF SEG$("SET",1,temp) = response$ THEN 8000 2110 IF POS(response$ + " "," ",1) < temp THEN temp = POS(response$," ",1) - 1 2120 IF SEG$("SHOW",1,temp) = SEG$(response$,1,temp) THEN 10000 2130 IF SEG$("MODIFY",1,temp) = SEG$(response$,1,temp) THEN 20000 2140 IF response$ = "" THEN 2010 2150 PRINT "?CONFIG-F-Invalid Command -- ";response$ 2160 GO TO 2010 2170 PRINT "?CONFIG-F-No Configuration File" 2180 GO TO 2010 5000 REM OPEN COMMAND 5010 IF config_file$ <> "" THEN CLOSE #2 5020 prompt$ = "Configuration file name [" + default_file$ + "]" \ GOSUB 9010 5030 IF POS(response$,".",1) = 0 THEN response$ = response$ + ".CNF" 5040 config_file$ = response$ 5200 OPEN config_file$ FOR INPUT AS FILE #2 5210 CLOSE #2 5220 OPEN config_file$ AS FILE #2 5230 GO TO 2010 6000 REM HELP COMMAND 6010 PRINT 6020 PRINT "IOBASIC Configuration Utility Command List:" 6030 GOSUB 6500 6040 GO TO 2010 6500 PRINT 6510 PRINT " EXIT Exit the utility." 6520 PRINT " HELP Display this message." 6530 PRINT " MODIFY Modify the configuration." 6540 PRINT " OPEN Open a different configuration file." 6550 PRINT " SAVE Save responses." 6560 PRINT " SHOW Display the current configuration." 6570 PRINT 6580 RETURN 7000 REM SAVE COMMAND 7010 IF save_file$ <> "" THEN CLOSE #3 7020 save_file$ = "" 7030 prompt$ = "Saved Response File" \ GOSUB 9010 7040 IF response$ = "" THEN 2010 7050 IF POS(response$,".",1) = 0 THEN response$ = response$ + ".COM" 7060 save_file$ = response$ 7070 OPEN save_file$ FOR OUTPUT AS FILE #3 7080 GO TO 2010 8000 REM SET COMMAND 8010 CBADDR(cbt_2%(1)) 8020 GOSUB 9800 8030 RESTORE 8100 READ type_code$ 8110 IF type_code$ = "*E" THEN 2000 8120 IF type_code$ <> "*M" THEN 8100 8130 READ message$,cbt_entry 8140 ppoint = 2 * cbt_2%(cbt_entry) 8150 pend = cbt_size%(cbt_entry) * 2 * rep_count%(cbt_entry) + ppoint 8160 rpoint = cbt%(cbt_entry) 8200 IF ppoint > pend THEN 8100 8210 t% = config%(rpoint) 8220 rpoint = rpoint + 1 8230 POKE(ppoint,t%) 8240 ppoint = ppoint + 2 8250 GO TO 8200 9000 REM SOLICITE A RESPONSE 9010 prompt$ = SEG$(prompt$ + space45$,1,45) + "? " 9020 IF indirect$ = "" THEN 9300 9030 IF END #1 THEN 9080 9040 LINPUT #1,response$ 9050 response$ = TRM$(response$) 9060 PRINT prompt$;response$ 9070 GO TO 9400 9080 CLOSE #1 9090 indirect$ = "" 9300 PRINT prompt$; 9310 LINPUT #0,response$ 9315 IF POS(response$,CHR$(3),1) > 0 THEN response$ = "" 9320 response$ = TRM$(response$) 9400 IF response$ <> "" THEN 9500 9410 temp = POS(prompt$,"[",1) 9420 IF temp = 0 THEN RETURN 9430 response$ = SEG$(prompt$,temp + 1,POS(prompt$,"]",temp + 1) - 1) 9500 IF save_file$ <> "" THEN PRINT #3,response$ 9510 IF SEG$(response$,1,1) = "@" THEN 9600 9520 IF SEG$(response$,1,1) = "!" THEN 9020 9530 IF SEG$(response$,1,1) = ";" THEN 9020 9540 RETURN 9600 IF indirect$ <> "" THEN CLOSE #1 9610 indirect$ = SEG$(response$,2,255) 9620 IF indirect$ = "" THEN 9300 9630 IF POS(indirect$,".",1) = 0 THEN indirect$ = indirect$ + ".COM" 9640 OPEN indirect$ FOR INPUT AS FILE #1 9650 GO TO 9020 9800 CBADDR(cbt%(1)) 9810 cbt%(5) = cbt%(5) - cbt%(1) + 2 9820 cbt%(4) = cbt%(4) - cbt%(1) + 2 9830 cbt%(3) = cbt%(3) - cbt%(1) + 2 9840 cbt%(2) = cbt%(2) - cbt%(1) + 2 9850 cbt%(1) = cbt%(1) - cbt%(1) + 2 9860 rep_count%(1) = config%(cbt%(1) - 2) 9870 cbt_size%(1) = config%(cbt%(1) - 1) 9880 rep_count%(2) = config%(cbt%(2) - 2) 9890 cbt_size%(2) = config%(cbt%(2) - 1) 9900 rep_count%(3) = config%(cbt%(3) - 2) 9910 cbt_size%(3) = config%(cbt%(3) - 1) 9920 rep_count%(4) = config%(cbt%(4) - 2) 9930 cbt_size%(4) = config%(cbt%(4) - 1) 9940 rep_count%(5) = config%(cbt%(5) - 2) 9950 cbt_size%(5) = config%(cbt%(5) - 1) 9960 RETURN 10000 REM SHOW COMMAND 10010 IF config_file$ = "" THEN 2170 10020 PRINT 10030 PRINT "CONFIGURATION OF ";config_file$;" ON ";date$;":" 10040 PRINT 10050 GOSUB 9800 10060 RESTORE 10080 section$ = SEG$(response$,temp + 2,255) 10090 IF section$ = "" THEN 12490 10100 READ type_code$ 10110 IF type_code$ = "*E" THEN 10160 10120 IF type_code$ <> "*M" THEN 10100 10130 READ message$,cbt_entry 10140 IF SEG$(message$,1,LEN(section$)) <> section$ THEN 10100 10150 GO TO 12525 10160 PRINT "?CONFIG-F-Invalid option" 10170 GO TO 2010 11000 READ type_code$ 11010 IF CTLC = 1 THEN 2010 11020 IF type_code$ = "*M" THEN 12000 11030 IF type_code$ = "*A" THEN 13000 11040 IF type_code$ = "*V" THEN 14000 11050 IF type_code$ = "*C" THEN 15000 11060 IF type_code$ = "*T" THEN 16000 11070 IF type_code$ = "*E" THEN 12000 11080 GO TO 2010 12000 rep_count%(cbt_entry) = rep_count%(cbt_entry) - 1 12010 counter = counter + 1 12020 IF rep_count%(cbt_entry) = 0 THEN 12500 12030 cbt%(cbt_entry) = cbt%(cbt_entry) + cbt_size%(cbt_entry) 12040 IF config%(cbt%(cbt_entry)) = 0 THEN 12500 12050 RESTORE 12060 READ type_code$ 12070 IF type_code$ <> "*M" THEN 12060 12080 READ temp$ 12090 IF temp$ <> message$ THEN 12060 12100 READ temp 12110 GO TO 11000 12490 READ type_code$ 12500 IF type_code$ <> "*M" THEN 12600 12510 IF section$ <> "" THEN 12600 12520 READ message$,cbt_entry 12525 IF config%(cbt%(cbt_entry)) = 0 THEN 12700 12530 PRINT 12540 PRINT message$ 12550 counter = 0 12560 GO TO 11000 12600 PRINT 12610 PRINT 12620 GO TO 2010 12700 READ type_code$ 12710 IF type_code$ = "*M" THEN 12500 12720 IF type_code$ = "*E" THEN 12600 12730 GO TO 12700 13000 GOSUB 19000 13010 TEST_ADDRESS(csr_address,temp) 13020 IF temp = 0 THEN csr_address$ = csr_address$ + " (Not present)" 13030 PRINT " ";csr_message$;TAB(40);csr_address$ 13040 IF csr_address <> 0 THEN 11000 13050 READ type_code$ 13060 IF csr_search$ <> type_code$ THEN 13050 13070 GO TO 11020 14000 GOSUB 19200 14010 PRINT " ";vect_message$;TAB(40);vect_address$ 14020 GO TO 11000 15000 GOSUB 19400 15010 PRINT " ";code_message$;TAB(46 - LEN(field$));field$ 15020 GO TO 11000 16000 READ text$,temp 16005 IF counter = 0 THEN counter = temp 16010 PRINT USING text$,counter 16020 GO TO 11000 18999 REM UTILITY SUBROUTINES 19000 READ csr_message$,csr_offset,csr_search$ 19010 csr_address = config%(cbt%(cbt_entry) + csr_offset / 2) 19020 CONVERT_OCTAL(csr_address,csr_address$) 19030 csr_search$ = "*" + SEG$(csr_search$,2,255) 19040 RETURN 19200 READ vect_message$,vect_offset 19210 vect_address = config%(cbt%(cbt_entry) + vect_offset / 2) 19220 CONVERT_OCTAL(vect_address,vect_address$) 19230 RETURN 19400 READ code_message$,code_offset,code_list$ 19410 code_value% = config%(cbt%(cbt_entry) + code_offset / 2) 19440 code_data% = code_value% 19450 IF code_offset AND 1 = 1 THEN code_data% = code_data% / 256 19460 code_data% = code_data% AND 255 19470 temp$ = code_list$ + "," 19480 temp = POS(temp$,"=",1) 19490 IF temp = 0 THEN 19540 19500 comma = POS(temp$,",",1) 19510 IF OCT(SEG$(temp$,1,temp - 1)) = code_data% THEN 19560 19520 temp$ = SEG$(temp$,comma + 1,255) 19530 IF temp$ <> "" THEN 19480 19540 field$ = "" 19550 RETURN 19560 field$ = SEG$(temp$,temp + 1,comma - 1) 19570 RETURN 20000 REM MODIFY COMMAND 20010 IF config_file$ = "" THEN 2170 20020 PRINT 20030 GOSUB 9800 20040 RESTORE 20060 section$ = SEG$(response$,temp + 2,255) 20070 IF section$ = "" THEN 22490 20080 READ type_code$ 20090 IF type_code$ = "*E" THEN 20140 20100 IF type_code$ <> "*M" THEN 20080 20110 READ message$,cbt_entry 20120 IF SEG$(message$,1,LEN(section$)) <> section$ THEN 20080 20130 GO TO 22530 20140 PRINT "?CONFIG-F-Invalid option" 20150 GO TO 2010 21000 READ type_code$ 21010 IF CTLC = 1 THEN 2010 21020 IF type_code$ = "*M" THEN 22000 21030 IF type_code$ = "*A" THEN 23000 21040 IF type_code$ = "*V" THEN 24000 21050 IF type_code$ = "*C" THEN 25000 21060 IF type_code$ = "*T" THEN 26000 21070 IF type_code$ = "*E" THEN 22000 21080 GO TO 2010 22000 rep_count%(cbt_entry) = rep_count%(cbt_entry) - 1 22010 counter = counter + 1 22020 IF rep_count%(cbt_entry) = 0 THEN 22500 22030 IF config%(cbt%(cbt_entry)) = 0 THEN 22500 22040 cbt%(cbt_entry) = cbt%(cbt_entry) + cbt_size%(cbt_entry) 22050 RESTORE 22060 READ type_code$ 22070 IF type_code$ <> "*M" THEN 22060 22080 READ temp$ 22090 IF temp$ <> message$ THEN 22060 22100 READ temp 22110 GO TO 21000 22490 READ type_code$ 22500 IF type_code$ <> "*M" THEN 22600 22510 IF section$ <> "" THEN 22600 22520 READ message$,cbt_entry 22530 PRINT 22540 PRINT message$ 22550 counter = 0 22560 GO TO 21000 22600 PRINT 22610 GO TO 2010 23000 GOSUB 19000 23010 prompt$ = SEG$(" " + csr_message$ + space45$,1,35) 23020 prompt$ = prompt$ + " [" + csr_address$ + "]" 23030 GOSUB 9000 23040 GOSUB 29000 23050 IF LEN(response$) > 6 THEN 23900 23060 IF response$ = "" THEN 23900 23070 CONVERT_OCTAL(response$,temp) 23080 IF temp > 0 THEN 23900 23090 IF temp < OCT("160010") THEN 23900 23100 IF temp / 2 <> INT(temp / 2) THEN 23900 23110 TEST_ADDRESS(temp,comma) 23120 IF comma = 1 THEN 23140 23130 PRINT "?CONFIG-W-Nonexistent ";csr_message$;" (";response$;")" 23140 config%(cbt%(cbt_entry) + csr_offset / 2) = temp 23150 IF temp <> 0 THEN 21000 23160 READ type_code$ 23170 IF csr_search$ <> type_code$ THEN 23160 23180 GO TO 21020 23900 PRINT "?CONFIG-F-Invalid ";csr_message$ 23910 GO TO 23010 24000 GOSUB 19200 24010 prompt$ = SEG$(" " + vect_message$ + space45$,1,35) 24020 prompt$ = prompt$ + " [" + vect_address$ + "]" 24030 GOSUB 9000 24040 GOSUB 29000 24050 IF LEN(response$) > 3 THEN 24900 24060 IF response$ = "" THEN 24900 24070 CONVERT_OCTAL(response$,temp) 24080 IF temp < 0 THEN 24900 24090 IF temp > OCT("774") THEN 24900 24100 IF temp / 4 <> INT(temp / 4) THEN 24900 24110 config%(cbt%(cbt_entry) + vect_offset / 2) = temp 24120 GO TO 21000 24900 PRINT "?CONFIG-F-Invalid ";vect_message$ 24910 GO TO 24010 25000 GOSUB 19400 25010 prompt$ = SEG$(" " + code_message$ + space45$,1,41 - LEN(field$)) 25020 prompt$ = prompt$ + " [" + field$ + "]" 25030 GOSUB 9000 25040 temp = POS(code_list$ + ",","=" + response$ + ",",1) 25050 IF temp = 0 THEN 25900 25060 comma = temp - 2 25070 IF comma = 0 THEN 25110 25080 IF SEG$(code_list$,comma,comma) = "," THEN 25110 25090 comma = comma - 1 25100 GO TO 25070 25110 code_data% = OCT(SEG$(code_list$,comma + 1,temp - 1)) 25115 IF code_offset AND 1 = 0 THEN 25130 25120 code_value% = code_value% AND 255 OR code_data% * 256% \ GO TO 25140 25130 code_value% = code_value% AND NOT 255 OR code_data% 25140 config%(cbt%(cbt_entry) + code_offset / 2) = code_value% 25150 GO TO 21000 25900 PRINT "?CONFIG-F-Invalid response" 25910 GO TO 25010 26000 READ text$,temp 26005 IF counter = 0 THEN counter = temp 26010 PRINT USING text$,counter 26020 GO TO 21000 29000 IF SEG$(response$,1,1) <> "" THEN 29030 29010 IF response$ = "" THEN RETURN 29020 response$ = SEG$(response$,2,255) \ GO TO 29000 29030 FOR temp = 1 TO LEN(response$) 29040 IF POS("01234567",SEG$(response$,temp,temp),1) = 0 THEN 29070 29050 NEXT temp 29060 RETURN 29070 response$ = "" 29080 RETURN 30000 DATA *M,"HIGH-LEVEL ANALOG INPUT:",1 30005 DATA *T," Board number ###:",1 30010 DATA *A,"Base address",0,>M 30020 DATA *V,"Vector address",2 30030 DATA *A,"DMA base address",4,M 30090 DATA *V,"Vector address",2 30100 DATA *A,"DMA base address",4,M 30160 DATA *C,"UNIPOLAR or BIPOLAR",2,"4=BIPOLAR,0=UNIPOLAR" 30170 DATA *C,"Range (2.5, 5, or 10 Volts)",3 30180 DATA "0=10 VOLTS,4=5 VOLTS,10=2.5 VOLTS,0=10,4=5,10=2.5" 30190 DATA *M,"CLOCK OUTPUT:",4 30200 DATA *A,"Base address",0,>M 30210 DATA *V,"Vector address",2 30220 DATA *M,"DIGITAL INPUT AND OUTPUT:",5 30230 DATA *T," Channel number ###:",0 30240 DATA *A,"Channel address",0,>E 30250 DATA *A,"CSR address",2, "" THEN CLOSE #1 32010 IF config_file$ <> "" THEN CLOSE #2 32020 IF save_file$ <> "" THEN CLOSE #3 32040 ENABLE_CTLC 32050 END .DIR SY: RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .TYPE Files? ADDRSS ?PIP-F-File not found DK:ADDRSS.LST .TYPE Files? SY:ADDRSS.D ?PIP-F-File not found SY:ADDRSS.D .TYPE Files? SY:ADDRSS.BAS 1000 REM ADDRSS.BAS - edit level: 1 1010 PRINT "Valid addresses in the I/O page (in octal):" 1020 PRINT 1030 first_address% = 0% 1040 FOR x% = OCT("160000") TO 0% STEP 2% 1050 IF x% = 0 THEN 1100 1060 TEST_ADDRESS(x%,result%) 1070 IF result% = 0 THEN 1170 1080 IF first_address% = 0% THEN 1150 1090 IF x% = last_address% + 2% THEN 1160 1100 CONVERT_OCTAL(first_address%,first_address$) 1110 CONVERT_OCTAL(last_address%,last_address$) 1120 PRINT first_address$; 1130 IF first_address% <> last_address% THEN PRINT "-";last_address$; 1140 PRINT 1150 first_address% = x% 1160 last_address% = x% 1170 NEXT x% 1180 END .DIR SY: RT11SJ.SYS 78P 17-May-85 XM .SYS 4P 17-May-85 DX .SYS 3P 17-May-85 DY .SYS 4P 17-May-85 DL .SYS 5P 17-May-85 DD .SYS 5P 17-May-85 LP .SYS 2P 17-May-85 LS .SYS 2P 17-May-85 IOBAS .SAV 82P 17-May-85 CONFIG.CNF 7P 17-May-85 CONFIG.BAS 27P 17-May-85 CONFIG.SAV 5P 17-May-85 TSTPBS.SAV 2P 17-May-85 STARTS.COM 1P 17-May-85 EMPTY .FIL 37P 17-May-85 EPROM .BAS 10P 17-May-85 ADDRSS.BAS 2P 17-May-85 TIME .BAS 4P 17-May-85 LANDER.BAS 3P 17-May-85 CODE .BAS 5P 17-May-85 PIP .SAV 29P 17-May-85 DIR .SAV 19P 17-May-85 DUP .SAV 45P 17-May-85 KED .SAV 59P 17-May-85 SWAP .SYS 26P 17-May-85 25 Files, 466 Blocks 0 Free blocks .TYPE Files? SY:LANDER.BAS 80 REM LANDER.BAS - edit level: 2 90 REM 100 RANDOMIZE 110 speed = 0 120 height = 1400 + INT(RND(0) * 200) 130 fuel = 300 140 accel = 9.8 150 thrust = 0 160 PRINT 170 PRINT " LUNAR LANDER" 180 PRINT 190 PRINT " Type the keys 0 - 9 for thrust (9 is highest)." 200 PRINT " Try to land as gently as possible." 210 PRINT 220 PRINT USING "Initial fuel: ####.# Initial height: ####.#",fuel,height 230 PRINT 240 PRINT "Get Ready" 250 WAIT(2) 260 PRINT 270 DISABLE_CTLC 280 WAIT(1) 282 CHAR_IN(0,char%) \ IF char% < 0 THEN 330 290 IF char% = 3 THEN 570 300 IF char% < 48 THEN 330 310 IF char% > 57 THEN 330 320 thrust = char% - 48 330 IF fuel > thrust THEN fuel = fuel - thrust \ GO TO 350 340 thrust = fuel \ fuel = 0 350 acc = 2 * thrust - accel + height / 600 360 speed = speed + .5 * acc 370 height = height + speed 380 IF height <= 0 THEN 460 390 PRINT USING "Height:#####.#",height; 400 negspeed = - speed 410 PRINT USING " Speed:####.#",negspeed; 420 PRINT USING " Fuel:#####.#",fuel; 430 PRINT USING " Thrust:##",thrust 440 GO TO 280 460 IF height > - 5 THEN 510 470 PRINT 480 PRINT "BOOM! "; 490 PRINT USING "You made a ###.# foot hole in the ground.";height * - 1 500 GO TO 520 510 IF ABS(speed) < 5 THEN 540 520 PRINT USING "You smeared into the ground at a speed of ####.#", - 1 * speed 530 GO TO 570 540 PRINT 550 PRINT "GOOD LANDING!!" 560 PRINT USING "Impact depth: #.# Speed: #.#", - 1 * height, - 1 * speed 570 ENABLE_CTLC 580 END .