Home » CEEFAX disks » telesoftware8.adl » 22-07-88/CLKSET
22-07-88/CLKSET
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » CEEFAX disks » telesoftware8.adl |
Filename: | 22-07-88/CLKSET |
Read OK: | ✔ |
File size: | 3F70 bytes |
Load address: | FFFF0E00 |
Exec address: | FFFF802B |
File contents
10REM SETCLOCK PROGRAM FOR MASTER 128 20REM (C) Ian Stubbs 1986 30REM REQUIRES BBC ATS ROM 40: 50MODE 7 60HIMEM=&7000 70DIM code% 280 80DIM hexaddr 5 90osasci=&FFE3 100osrdch=&FFE0 110oswrch=&FFEE 120osbyte=&FFF4 130osword=&FFF1 140oscli=&FFF7 150PROCassemble_tools 160PROCassemble(&7000) 170PROCinstructions 180PROCdemo 190PROCcollect_data 200PROCassemble(address) 210PROCsave 220PROCend 230: 240REM PROCEDURES 250: 260DEF PROCassemble(origin) 270: 280para%=origin+&1E0 290FOR pass%=4 TO 6 STEP 2 300P%=origin 310O%=&7000 320[OPT pass% 330.begin 340LDA #&D 350STA para% 360JSR ttx_command \Switch on Telextext interrupts 370LDA #1 380STA para% 390LDA #0 400STA para%+1 410JSR ttx_command \Set channel to BBC-1 420JSR delay 430JSR delay 440LDA #1 450STA para%-4 \Set magazine number to 1 for BBC-1 target page (100) 460LDA #17 470STA para% 480JSR ttx_command \Read Teletext Adaptor Status 490LDA para%+1 500CMP #&FF 510BEQ no_adaptor 520CMP #2 530BEQ adaptor_off 540CMP #1 550BEQ no_signal 560JMP start 570.no_adaptor 580JSR exit 590BRK 600EQUB &FF 610EQUS "No Adaptor" 620BRK 630.adaptor_off 640JSR exit 650BRK 660EQUB 50 670EQUS "Adaptor off" 680BRK 690.no_signal 700LDA #1 710STA para% 720STA para%+1 730JSR ttx_command \Change channel to BBC-2 740LDA #2 750STA para%-4 \Change magazine number of target page to 2 (200), BBC-2 760JSR delay 770JSR delay 780JSR delay 790JSR delay 800LDA #17 810STA para% 820JSR ttx_command \Read Adaptor Status again 830LDA para%+1 840BEQ start \If signal found then start program proper 850JSR exit 860BRK \else flag error. 870EQUB 51 880EQUS "No CEEFAX" 890BRK 900.start 910LDA #7 920STA para% 930LDA #1 940STA para%+1 950JSR ttx_command \Set page capture routine to get HEADER LINE ONLY 960LDA #0 970STA para%+16 \Set header detect byte 980LDA #5 990STA para% 1000LDA #18 1010STA para%+1 1020LDA para%-4 1030STA para%+2 1040LDA #0 1050STA para%+3 1060LDA #&3F 1070STA para%+4 1080LDA #&7F 1090STA para%+5 1100LDA #(para% MOD 256) 1110STA para%+6 1120LDA #(para% DIV 256) 1130STA para%+7 1140JSR ttx_command \Get page 100 from CEEFAX (BBC-1) or 200 (BBC-2) 1150LDA #&FF \Set "give up looking for header" threshold byte 1 1160STA para%-1 1170LDA #&3F \Set byte 2 1180STA para%-2 1190.test_for_header 1200LDA para%+16 1210BNE get_time \Check if header arrived 1220LDY #0 \If not, wait a bit then test again 1230.wait 1240NOP 1250DEY 1260BNE wait 1270DEC para%-1 1280BNE test_for_header 1290DEC para%-2 1300BNE test_for_header 1310JSR exit 1320BRK 1330EQUB 52 1340EQUS "Can't find time/date" 1350BRK 1360.get_time 1370\LDA #14 1380\STA para% 1390\JSR ttx_command \Clear page grabber so it doesn't over-write data 1400.try_again 1410LDA #21 1420STA para% 1430JSR ttx_command \Get time from TSDP 1440LDA para%+10 1450CMP #&FF \Test to see if time found 1460BEQ try_again \Retry if not 1470JSR delay \1 second delay to bodge CMOS set routine to give 1480JSR delay \correct result 1490JSR delay 1500LDA #8 1510STA para% 1520LDA #&F 1530LDX #para% MOD 256 1540LDY #para% DIV 256 1550JSR osword \Set time in CMOS clock 1560.get_date 1570LDA #22 1580STA para% 1590JSR ttx_command \Get date from TSDP (Only year will be used) 1600LDA para%+12 1610CMP #&FF \Check to see if date found 1620BEQ get_date \Retry if not. 1630LDY #&7 \Move year to correct pos. in parameter block 1640LDX #&21 1650.nextchar 1660LDA para%,Y 1670STA para%,X 1680INY 1690INX 1700CPX #&25 1710BNE nextchar 1720LDA #ASC(",") 1730STA para%+&19 \Insert comma after day 1732LDA #ASC(" ") 1734STA para%+&20 \Insert space between month and year 1740LDY #&16 \Then ensure the rest of the date is STANDARD ASCII 1750.next 1760LDA para%,Y 1770AND #&7F 1780STA para%,Y 1790INY 1800CPY #&26 1810BNE next 1820LDA #&F 1830STA para%+&15 1840LDA #&F 1850LDX #(para%+&15) MOD 256 1860LDY #(para%+&15) DIV 256 1870JSR osword \Set CMOS calender 1880LDX #(time MOD 256) 1890LDY #(time DIV 256) 1900JSR oscli \Perform *TIME 1910.exit \Reset previous values, switch off ttx and exit 1920LDA #7 1930STA para% 1940LDA #30 1950STA para%+1 1960JSR ttx_command \Reset no. of rows captured to 30 1970\LDA #14 1980\STA para% 1990\JSR ttx_command \Clear page grabber 2000LDA #12 2010STA para% 2020JSR ttx_command \Switch off Teletext interrupts 2030RTS 2040.ttx_command \Ttx OSWORD subroutine 2050LDA #&7A 2060LDX #para% MOD 256 2070LDY #para% DIV 256 2080JSR osword 2090RTS 2100.delay \Does nothing for about a third of a second 2110LDX #&FF 2120LDY #&FF 2130.delay_loop 2140DEY 2150NOP:NOP 2160BNE delay_loop 2170DEX 2180BNE delay_loop 2190RTS 2200.time 2210EQUS "TI." 2220EQUB &D 2230.tel 2240EQUS "B." 2250EQUB &D 2260] 2270NEXT pass% 2280ENDPROC 2290: 2300DEF PROCinstructions 2310: 2320CLS 2330PRINT CHR$141CHR$130" Setclock Instructions" 2340PRINT CHR$141CHR$130" Setclock Instructions" 2350VDU28,0,23,39,3 2360PRINT "SETCLOCK gets the date and time from " 2370PRINT "CEEFAX and sets the Master's internal " 2380PRINT "CMOS calender/clock. It uses BBC-1 by " 2390PRINT "default but, if it cannot find any " 2400PRINT "Teletext on BBC-1, it will try BBC-2. " 2410PRINT "It is, of course, only of value to " 2420PRINT "users of the Master and so use has" 2430PRINT "been made of facilities provided only " 2440PRINT "on that machine. The program uses " 2450PRINT "OSWORD routines provided by the new BBC" 2460PRINT "ATS ROM. It is not compatible with TFS." 2470PRINT " This Basic program will generate the" 2480PRINT "machine code routine SETCLOCK. You will" 2490PRINT "be able to choose where it will run in " 2500PRINT "memory. The filename given to the code " 2510PRINT "will depend on the filing system you " 2520PRINT "are using at the moment, as will the" 2530PRINT "choice of assembly addresses offered." 2540PROCspace 2550PRINT "The best address for most users will be" 2560PRINT "&B00. This is Econet workspace and will" 2570PRINT "be unused in the majority of cases. If " 2580PRINT "you are using the network facility then" 2590PRINT "&900 is probably the best place to put " 2600PRINT "the routine. This is the cassette/RS423" 2610PRINT "input/output area. It's also used by " 2620PRINT "sound envelopes 5-16 and any speech " 2630PRINT "upgrade which may be present. If these " 2640PRINT "two alternatives don't suit you may " 2650PRINT "assemble the routine to run anywhere " 2660PRINT "but don't expect sensible results if " 2670PRINT "you put it somewhere daft. " 2680PROCspace 2690PRINT "Disc users should keep the program in " 2700PRINT "the current directory or library and " 2710PRINT "call it with *<filename>. Tape users " 2720PRINT "should use *RUN SETCLOCK." 2730PRINT '" Error messages will be given if the" 2740PRINT "clock cannot be reset. The routine can " 2750PRINT "be re-run using CALL &<address> if you " 2760PRINT "wish. This may be useful if you are " 2770PRINT "using tape." 2780PRINT '" If the clock has been correctly " 2790PRINT "reset a *TIME command is issued " 2800PRINT "resulting in the contents of the CMOS " 2810PRINT "clock being printed out as usual. " 2820PROCspace 2830PRINT "The next part of this program is a " 2840PRINT "demonstration of SETCLOCK. The CMOS " 2850PRINT "clock can be scrambled and then reset " 2860PRINT "from CEEFAX. (Follow on-screen " 2870PRINT "instructions.)" 2880PRINT '" The CEEFAX header is displayed for " 2890PRINT "reference throughout the demonstration." 2900PRINT "Do not be put off by the way the CMOS " 2910PRINT "clock appears to lead CEEFAX. SETCLOCK " 2920PRINT "uses the Television Service Data Packet" 2930PRINT "to set the clock and is more accurate " 2940PRINT "than the header. " 2950PROCspace 2960PRINT '" To leave the demonstration press f2." 2970PRINT "Then follow the directions to generate " 2980PRINT "SETCLOCK itself and save it to your " 2990PRINT "current filing system. If you are using" 3000PRINT "the ROM filing system or TFS the " 3010PRINT "program will not be saved. " 3020PRINT '" The program contains many notes so " 3030PRINT "you should be able to adapt it. Any " 3040PRINT "comments would be welcome via PRESTEL " 3050PRINT "mailbox 012373797." 3060PROCspace 3070ENDPROC 3080: 3090DEF PROCspace 3100: 3110PRINT TAB(5,19)CHR$131"Press SPACE BAR to continue" 3120REPEAT UNTIL INKEY(-99) 3130*FX15 3140CLS 3150ENDPROC 3160: 3170DEF PROCdemo 3180: 3190ON ERROR PROCerror:END 3200VDU26 3210CLS 3220PRINT TAB(0,0)CHR$134"SCLOCK";CHR$135; 3230*TTXON 3240*HON 3250*FX225,240 3260PROCc_off 3270PRINT TAB(6,2)CHR$141CHR$131"Setclock demonstration" 3280PRINT TAB(6)CHR$141CHR$131"Setclock demonstration" 3290PRINT TAB(9,7)CHR$141CHR$133"CMOS Clock reads:" 3300PRINT TAB(9)CHR$141CHR$133"CMOS Clock reads:" 3310red$=CHR$129+CHR$157+CHR$135 3320black$=CHR$156 3330PRINT TAB(1,20)red$;"f0 ";black$;" "; 3340PRINT red$;"f1 ";black$;" "; 3350PRINT red$;"f2 ";black$ 3360PRINT 'TAB(2)"Reset";TAB(15)"Scramble";TAB(29)"Exit demo" 3370REPEAT 3380*FX15 3390PROCupdate_time 3400IF A=240 THEN PROCsetclock 3410IF A=241 THEN PROCunset 3420UNTIL A=242 3430*HOFF 3440*TTXOFF 3450*FX225,1 3460VDU26 3470ON ERROR OFF 3480ENDPROC 3490: 3500DEF PROCunset 3510: 3520TIME$="Sat,14 Mar 1982.10:10:10" 3530ENDPROC 3540: 3550DEF PROCc_off 3560: 3570VDU23,1,0;0;0;0;0; 3580ENDPROC 3590: 3600DEF PROCc_on 3610: 3620VDU23,1,1;0;0;0;0; 3630ENDPROC 3640: 3650DEF PROCupdate_time 3660: 3670REPEAT 3680PRINT TAB(5,9)CHR$141CHR$134;TIME$ 3690PRINT TAB(5)CHR$141CHR$134;TIME$ 3700UNTIL ADVAL(-1)>0 3710A=GET 3720ENDPROC 3730: 3740DEF PROCsetclock 3750: 3760PRINT TAB(7,5)red$;"SETTING CMOS CLOCK ";black$ 3770PRINT TAB(5,13)CHR$141CHR$130"CMOS Clock last reset at:" 3780PRINT TAB(5)CHR$141CHR$130"CMOS Clock last reset at:"' 3790PRINT CHR$131" "; 3800CALL &7000 3810*TTXON 3820PRINT TAB(6,5);SPC(30); 3830ENDPROC 3840: 3850DEF PROCerror 3860: 3870*TTXOFF 3880IF ERR=17 REPORT:END 3890IF ERR=&FF error$="Sorry, no Teletext adaptor" 3900IF ERR=50 error$="Sorry, adaptor switched off" 3910IF ERR=51 error$="Sorry, not receiving CEEFAX" 3920IF ERR=52 error$="Sorry, can't find date/time" 3930error$=error$+" " 3940PRINT TAB(18-(LEN(error$)/2),16)red$;error$;black$ 3950VDU28,0,22,39,19 3960CLS 3970VDU26 3980PROCspace 3990PROCcollect_data 4000PROCsave 4010PROCend 4020ENDPROC 4030: 4040DEF PROCcollect_data 4050: 4060CLS 4070PRINT CHR$141CHR$134TAB(12)"Save SETCLOCK" 4080PRINT CHR$141CHR$134TAB(12)"Save SETCLOCK" 4090VDU28,0,22,39,3 4100file%=FNfile_sys 4110IF file%=0 PROCnofile:ENDPROC 4120IF file%=1 OR file%=2 PROCtape:ENDPROC 4130IF file%=3 OR file%=6 PROCnosave:ENDPROC 4140IF file%=4 PROCdfs:ENDPROC 4150IF file%=5 OR file%=8 PROCnet_adfs:ENDPROC 4160IF file%=6 PROCtfs:ENDPROC 4170ENDPROC 4180: 4190DEF PROCnofile 4200: 4210PRINT "There is no filing system selected. Please" 4220PRINT "select one and re-run the program." 4230PROCend 4240ENDPROC 4250: 4260DEF PROCtape 4270: 4280IF file%=1 fs$="TAPE (1200 Baud)" ELSE fs$="TAPE (300 Baud)" 4290filename$="SETCLOCK" 4300PROCprint_fs 4310PROCget_address 4320CLS 4330PRINTTAB(0,5);CHR$136CHR$129; 4340VDU28,10,22,27,13 4350ENDPROC 4360: 4370DEF PROCnosave 4380IF file%=3 fs$="ROM" ELSE fs$="Telesoftware" 4390PRINT "Sorry, you cannot save to the ";fs$ 4400PRINT '"filing system. Please select another" 4410PRINT '"(e.g. disc or tape) and re-run the" 4420PRINT '"program." 4430PROCc_on 4440VDU26 4450PRINT TAB(0,15); 4460END 4470ENDPROC 4480: 4490DEF PROCdfs 4500: 4510fs$="DISC (DFS)" 4520filename$="SETCLK" 4530PROCprint_fs 4540PRINT CHR$131"Please enter any prefix to filename" 4550PRINT CHR$131"(i.e. :1.W. to save file to drive 1," 4560PRINT CHR$131"directory W.) Press <RETURN> to" 4570PRINT CHR$131"finish entry." 4580PROCc_on 4590PRINT ''TAB(12)CHR$134;:INPUT "PREFIX: "prefix$ 4600PROCc_off 4610IF LEN(prefix$)<>0 IF RIGHT$(prefix$,1)<>"." prefix$=prefix$+"." 4620filename$=prefix$+filename$ 4630PROCget_address 4640ENDPROC 4650: 4660DEF PROCnet_adfs 4670: 4680IF file%=5 fs$="NETWORK" ELSE fs$="DISC (ADFS)" 4690filename$="SETCLOCK" 4700PROCprint_fs 4710PRINT CHR$131"Please enter any pathname that you" 4720PRINT CHR$131"require added to the beginning of" 4730PRINT CHR$131"the filename. Press <RETURN> to" 4740PRINT CHR$131"finish entry." 4750PROCc_on 4760PRINT ''CHR$134;:INPUT "PATHNAME: "prefix$ 4770PROCc_off 4780IF LEN(prefix$)<>0 IF RIGHT$(prefix$,1)<>"." prefix$=prefix$+"." 4790filename$=prefix$+filename$ 4800PROCget_address 4810ENDPROC 4820: 4830DEF PROCprint_fs 4840: 4850PRINT CHR$131"Current filing system:"CHR$135;fs$ 4860PRINT 'CHR$131"The program will be saved as"CHR$135;filename$ 4870VDU28,0,22,39,8 4880ENDPROC 4890: 4900DEF PROCget_address 4910: 4920PRINT ''CHR$130" Where would you like the routine?"'' 4930IF file%>2 PRINT CHR$131"1. Serial/cassette port buffers (&900)"' 4940PRINT 'CHR$131"2. Econet workspace (&B00)"' 4950PRINT 'CHR$131"3. At another address"' 4960REPEAT 4970A=GET 4980UNTIL (file%>2 AND (A>48 AND A<52)) OR (A>49 AND A<52) 4990IF A=49 address=&900:ENDPROC 5000IF A=50 address=&B00:ENDPROC 5010IF A=51 PROCuser_address:ENDPROC 5020ENDPROC 5030: 5040DEF PROCuser_address 5050CLS 5060PROCc_on 5070PRINT 'CHR$131"Please enter the address you require:" 5080PRINT 'TAB(14)CHR$134;"&"; 5090address=FNhex_input 5100PROCc_off 5110ENDPROC 5120: 5130DEF FNhex_input 5140: 5150=USR(hex_input) AND &FFFF 5160: 5170DEF FNhex_string(integer) 5180: 5190A%=integer MOD 256 5200X%=integer DIV 256 5210CALL hex_string 5220=$hexaddr 5230: 5240DEF FNfile_sys 5250: 5260A%=0 5270Y%=0 5280=USR(&FFDA) AND &FF 5290: 5300DEF PROCsave 5310: 5320address$=FNhex_string(address) 5330OSCLI ("SAVE "+filename$+" 7000 +200 FFFF"+address$+" FFFF"+address$) 5340ENDPROC 5350: 5360DEF PROCend 5370VDU26 5380CLS 5390PRINT '''CHR$131" The program has been saved as:" 5400PRINT 'TAB(19-(LEN(filename$)/2))CHR$134;filename$ 5410PRINT ''CHR$131"Don't forget to save THIS Basic program" 5420PRINT CHR$131" too, it contains the source code!" 5430PRINT '' 5440PROCc_on 5450END 5460ENDPROC 5470: 5480DEF PROCassemble_tools 5490: 5500FOR pass%=0 TO 2 STEP 2 5510P%=code% 5520[OPT pass% 5530.hex_string 5540STA &70 \Save bytes for future use 5550STX &71 5560LDA #0 5570STA hexaddr \Clear hex string to nothing 5580STA hexaddr+1 5590STA hexaddr+2 5600STA hexaddr+3 5610LDA #&D \Set <CR> at end of hex string 5620STA hexaddr+4 5630LDA &70 5640AND #&F \Find lower nybble of low byte 5650JSR convert \Find ASCII value of nybble 5660STA hexaddr+3 \Store in string 5670TXA 5680AND #&F \Find lower nybble of high byte 5690JSR convert \as above 5700STA hexaddr+1 5710LDA &70 \Find higher nybble of low byte 5720LSR A:LSR A:LSR A:LSR A 5730JSR convert \as above 5740STA hexaddr+2 5750LDA &71 \Find higher nybble of high byte 5760LSR A:LSR A:LSR A:LSR A 5770JSR convert \as above 5780STA hexaddr 5790RTS 5800.convert \SUBROUTINE returns ASCII value of nybble in A 5810CMP #10 \Is nybble alpha? (i.e. >9) 5820BPL alpha \If so, jump to alpha routine 5830CLC \Otherwise add 48 to it and return 5840ADC #48 5850RTS 5860.alpha \It's alpha so add 55 to it and return 5870CLC 5880ADC #55 5890RTS 5900.hex_input 5910LDX #0 \Set character counter/pointer 5920.get_char \get a character from input stream 5930JSR osrdch 5940BCS error \Trap invalid character 5950CMP #13 5960BEQ end_entry \Detect and act upon <RETURN> 5970CMP #127 5980BEQ delete \Detect and act upon <DELETE> 5990CMP #48 \Range check. Pass only 0-9 and A-E (no lower case) 6000BMI beep 6010CMP #71 6020BPL beep 6030CMP #58 6040BMI ok 6050CMP #65 6060BMI beep 6070.ok 6080CPX #4 \Detect sneaky try at entering a 5th digit 6090BEQ beep 6100STA hexaddr,X \Add chracter to string 6110INX \Update counter/pointer 6120JSR oswrch \Put character on screen 6130JMP get_char 6140.beep \Make a beep and go back to get_char 6150LDA #7 6160JSR oswrch 6170JMP get_char 6180.error \Jump out on error 6190RTS 6200.delete \Action <DELETE> key 6210CPX #0 6220BEQ beep \If nothing to delete, beep and go to get_char 6230LDA #8 6240JSR oswrch 6250LDA #32 6260JSR oswrch 6270LDA #8 6280JSR oswrch 6290DEX 6300JMP get_char 6310.end_entry \Exit collection routine 6320CPX #4 \All 4 characters used? 6330BEQ evaluate 6340CPX #0 \No characters entered? 6350BEQ quick_exit 6360STX &70 \If not, pad with leading zeros 6370LDA #4 6380SEC 6390SBC &70 \Find how many spaces to pad 6400STA &70 6410DEX \Change X from counter to pointer 6420TXA 6430CLC 6440ADC &70 6450TAY \Set Y to point at target byte 6460.shift \Shift valid chars to end of string 6470LDA hexaddr,X 6480STA hexaddr,Y 6490DEY 6500DEX 6510BMI continue 6520JMP shift 6530.continue 6540LDY #0 \Add leading zeros 6550LDA #48 \(ASCII "0") 6560.pad 6570STA hexaddr,Y 6580INY 6590CPY &70 6600BNE pad 6610.evaluate \Decode hex string to 2 byte integer 6620LDA hexaddr+3 6630JSR decode \Low nybble, low byte 6640STA &70 6650LDA hexaddr+2 \high nybble, low byte 6660JSR decode 6670ASL A:ASL A:ASL A:ASL A 6680CLC 6690ADC &70 \Add two nybbles together and store in Y 6700TAY 6710LDA hexaddr+1 \Low nybble, high byte 6720JSR decode 6730STA &70 6740LDA hexaddr \High nybble, high byte 6750JSR decode 6760ASL A:ASL A:ASL A:ASL A 6770CLC 6780ADC &70 \Add two nybbles together and store in X 6790TAX 6800TYA \Move low byte back into A & exit 6810RTS 6820.decode \Nybble decode subroutine 6830CMP #58 \Is it > 9? 6840BPL dec_alpha 6850SEC \If not, subtract 48 6860SBC #48 6870RTS 6880.dec_alpha 6890SEC \If it is, subtract 55 (ALPHA) 6900SBC #55 6910RTS 6920.quick_exit \Used only if no characters entered (essential) 6930LDA #0 6940TAX 6950RTS 6960] 6970NEXT pass% 6980ENDPROC 6990:
%� SETCLOCK PROGRAM FOR MASTER 128 � (C) Ian Stubbs 1986 � REQUIRES BBC ATS ROM (: 2� 7 <�=&7000 F� code% 280 P� hexaddr 5 Zosasci=&FFE3 dosrdch=&FFE0 noswrch=&FFEE xosbyte=&FFF4 �osword=&FFF1 �oscli=&FFF7 ��assemble_tools ��assemble(&7000) ��instructions � �demo ��collect_data ��assemble(address) � �save ��end �: �� PROCEDURES �: � �assemble(origin) : para%=origin+&1E0 "� pass%=4 � 6 � 2 , P%=origin 6O%=&7000 @[OPT pass% J .begin TLDA #&D ^ STA para% h5JSR ttx_command \Switch on Telextext interrupts r LDA #1 | STA para% � LDA #0 �STA para%+1 �+JSR ttx_command \Set channel to BBC-1 � JSR delay � JSR delay � LDA #1 �KSTA para%-4 \Set magazine number to 1 for BBC-1 target page (100) �LDA #17 � STA para% �3JSR ttx_command \Read Teletext Adaptor Status �LDA para%+1 �CMP #&FF �BEQ no_adaptor CMP #2 BEQ adaptor_off CMP #1 &BEQ no_signal 0 JMP start :.no_adaptor DJSR exit NBRK XEQUB &FF bEQUS "No Adaptor" lBRK v.adaptor_off �JSR exit �BRK �EQUB 50 �EQUS "Adaptor off" �BRK �.no_signal � LDA #1 � STA para% �STA para%+1 �3JSR ttx_command \Change channel to BBC-2 � LDA #2 �SSTA para%-4 \Change magazine number of target page to 2 (200), BBC-2 � JSR delay JSR delay JSR delay JSR delay LDA #17 * STA para% 45JSR ttx_command \Read Adaptor Status again >LDA para%+1 HEBEQ start \If signal found then start program proper RJSR exit \,BRK \else flag error. fEQUB 51 pEQUS "No CEEFAX" zBRK � .start � LDA #7 � STA para% � LDA #1 �STA para%+1 �EJSR ttx_command \Set page capture routine to get HEADER � �LY � LDA #0 �/STA para%+16 \Set header detect byte � LDA #5 � STA para% �LDA #18 �STA para%+1 �LDA para%-4 STA para%+2 LDA #0 STA para%+3 $LDA #&3F .STA para%+4 8LDA #&7F BSTA para%+5 LLDA #(para% � 256) VSTA para%+6 `LDA #(para% � 256) jSTA para%+7 tHJSR ttx_command \Get page 100 from CEEFAX (BBC-1) or 200 (BBC-2) ~JLDA #&FF \Set "give up looking for header" threshold byte 1 �STA para%-1 �#LDA #&3F \Set byte 2 �STA para%-2 �.test_for_header �LDA para%+16 �0BNE get_time \Check if header arrived �;LDY #0 \If not, wait a bit then test again � .wait �NOP �DEY �BNE wait �DEC para%-1 BNE test_for_header DEC para%-2 BNE test_for_header JSR exit (BRK 2EQUB 52 <EQUS "Can't find time/date" FBRK P .get_time Z\LDA #14 d\STA para% nK\JSR ttx_command \Clear page grabber so it doesn't over-write data x.try_again �LDA #21 � STA para% �,JSR ttx_command \Get time from TSDP �LDA para%+10 �3CMP #&FF \Test to see if time found �&BEQ try_again \Retry if not �JJSR delay \1 second delay to bodge CMOS set routine to give �(JSR delay \correct result � JSR delay � LDA #8 � STA para% �LDA #&F �LDX #para% � 256 LDY #para% � 256 0JSR osword \Set time in CMOS clock .get_date "LDA #22 , STA para% 6EJSR ttx_command \Get date from TSDP (Only year will be used) @LDA para%+12 J4CMP #&FF \Check to see if date found T'BEQ get_date \Retry if not. ^FLDY #&7 \Move year to correct pos. in parameter block hLDX #&21 r .nextchar |LDA para%,Y �STA para%,X �INY �INX �CPX #&25 �BNE nextchar �LDA #�(",") �0STA para%+&19 \Insert comma after day �LDA #�(" ") �=STA para%+&20 \Insert space between month and year �JLDY #&16 \Then ensure the rest of the date is STANDARD �II � .next �LDA para%,Y � � #&7F �STA para%,Y �INY CPY #&26 BNE next LDA #&F &STA para%+&15 0LDA #&F :LDX #(para%+&15) � 256 DLDY #(para%+&15) � 256 N+JSR osword \Set CMOS calender XLDX #(time � 256) bLDY #(time � 256) l$JSR oscli \Perform *� vH.exit \Reset previous values, switch off ttx and exit � LDA #7 � STA para% �LDA #30 �STA para%+1 �:JSR ttx_command \Reset no. of rows captured to 30 �\LDA #14 �\STA para% �-\JSR ttx_command \Clear page grabber �LDA #12 � STA para% �8JSR ttx_command \Switch off Teletext interrupts �RTS �/.ttx_command \Ttx OSWORD subroutine LDA #&7A LDX #para% � 256 LDY #para% � 256 JSR osword *RTS 4D.delay \Does nothing for about a third of a second >LDX #&FF HLDY #&FF R.delay_loop \DEY fNOP:NOP pBNE delay_loop zDEX �BNE delay_loop �RTS � .time �EQUS "TI." �EQUB &D �.tel � EQUS "B." �EQUB &D �] �� pass% �� �: �� �instructions : � *� �141�130" Setclock Instructions" $*� �141�130" Setclock Instructions" .�28,0,23,39,3 8/� "SETCLOCK gets the date and time from " B/� "CEEFAX and sets the Master's internal " L/� "CMOS calender/clock. It uses BBC-1 by " V/� "default but, if it cannot find any " `/� "Teletext on BBC-1, it will try BBC-2. " j/� "It is, of course, only of value to " t*� "users of the Master and so use has" ~/� "been made of facilities provided only " �/� "on that machine. The program uses " �/� "OSWORD routines provided by the new BBC" �/� "ATS ROM. It is not compatible with TFS." �/� " This Basic program will generate the" �/� "machine code routine SETCLOCK. You will" �/� "be able to choose where it will run in " �/� "memory. The filename given to the code " �/� "will depend on the filing system you " �,� "are using at the moment, as will the" �-� "choice of assembly addresses offered." � �space �/� "The best address for most users will be" /� "&B00. This is Econet workspace and will" /� "be unused in the majority of cases. If " /� "you are using the network facility then" /� "&900 is probably the best place to put " (/� "the routine. This is the cassette/RS423" 2/� "input/output area. It's also used by " </� "sound envelopes 5-16 and any speech " F/� "upgrade which may be present. If these " P/� "two alternatives don't suit you may " Z/� "assemble the routine to run anywhere " d/� "but don't expect sensible results if " n/� "you put it somewhere daft. " x �space �/� "Disc users should keep the program in " �/� "the current directory or library and " �/� "call it with *<filename>. Tape users " �!� "should use *RUN SETCLOCK." �/� '" Error messages will be given if the" �/� "clock cannot be reset. The routine can " �/� "be re-run using CALL &<address> if you " �/� "wish. This may be useful if you are " �� "using tape." �/� '" If the clock has been correctly " �/� "reset a *TIME command is issued " �/� "resulting in the contents of the CMOS " �/� "clock being printed out as usual. " �space +� "The next part of this program is a " /� "demonstration of SETCLOCK. The CMOS " "/� "clock can be scrambled and then reset " ,/� "from CEEFAX. (Follow on-screen " 6� "instructions.)" @/� '" The CEEFAX header is displayed for " J/� "reference throughout the demonstration." T/� "Do not be put off by the way the CMOS " ^/� "clock appears to lead CEEFAX. SETCLOCK " h/� "uses the Television Service Data Packet" r/� "to set the clock and is more accurate " |/� "than the header. " � �space �/� '" To leave the demonstration press f2." �/� "Then follow the directions to generate " �/� "SETCLOCK itself and save it to your " �/� "current filing system. If you are using" �/� "the ROM filing system or TFS the " �/� "program will not be saved. " �/� '" The program contains many notes so " �/� "you should be able to adapt it. Any " �/� "comments would be welcome via PRESTEL " �� "mailbox 012373797." � �space �� : � �space : &-� �5,19)�131"Press SPACE BAR to continue" 0� � �(-99) : *FX15 D� N� X: b� �demo l: v� � �error:� ��26 �� �� �0,0)�134"SCLOCK";�135; � *TTXON �*HON �*FX225,240 � �c_off �+� �6,2)�141�131"Setclock demonstration" �)� �6)�141�131"Setclock demonstration" �&� �9,7)�141�133"CMOS Clock reads:" �$� �9)�141�133"CMOS Clock reads:" �red$=�129+�157+�135 �black$=�156 (� �1,20)red$;"f0 ";black$;" "; "� red$;"f1 ";black$;" "; � red$;"f2 ";black$ 0� '�2)"Reset";�15)"Scramble";�29)"Exit demo" *� 4 *FX15 >�update_time H� A=240 � �setclock R� A=241 � �unset \� A=242 f *HOFF p*TTXOFF z*FX225,1 ��26 � � � � �� �: �� �unset �: �!�$="Sat,14 Mar 1982.10:10:10" �� �: �� �c_off �: ��23,1,0;0;0;0;0; �� : � �c_on : $�23,1,1;0;0;0;0; .� 8: B� �update_time L: V� `� �5,9)�141�134;�$ j� �5)�141�134;�$ t � �(-1)>0 ~A=� �� �: �� �setclock �: �-� �7,5)red$;"SETTING CMOS CLOCK ";black$ �/� �5,13)�141�130"CMOS Clock last reset at:" �-� �5)�141�130"CMOS Clock last reset at:"' �� �131" "; �� &7000 � *TTXON �� �6,5);�(30); �� : � �error : *TTXOFF (� �=17 �:� 2/� �=&FF error$="Sorry, no Teletext adaptor" </� �=50 error$="Sorry, adaptor switched off" F/� �=51 error$="Sorry, not receiving CEEFAX" P/� �=52 error$="Sorry, can't find date/time" Zerror$=error$+" " d-� �18-(�(error$)/2),16)red$;error$;black$ n�28,0,22,39,19 x� ��26 � �space ��collect_data � �save ��end �� �: �� �collect_data �: �� �!� �141�134�12)"Save SETCLOCK" �!� �141�134�12)"Save SETCLOCK" ��28,0,22,39,3 file%=�file_sys � file%=0 �nofile:� � file%=1 � file%=2 �tape:� "!� file%=3 � file%=6 �nosave:� ,� file%=4 �dfs:� 6#� file%=5 � file%=8 �net_adfs:� @� file%=6 �tfs:� J� T: ^ � �nofile h: r2� "There is no filing system selected. Please" |*� "select one and re-run the program." ��end �� �: �� �tape �: �<� file%=1 fs$="TAPE (1200 Baud)" � fs$="TAPE (300 Baud)" �filename$="SETCLOCK" � �print_fs ��get_address �� ��0,5);�136�129; ��28,10,22,27,13 �� : � �nosave ,� file%=3 fs$="ROM" � fs$="Telesoftware" &*� "Sorry, you cannot save to the ";fs$ 0-� '"filing system. Please select another" :+� '"(e.g. disc or tape) and re-run the" D� '"program." N �c_on X�26 b � �0,15); l� v� �: � � �dfs �: �fs$="DISC (DFS)" �filename$="SETCLK" � �print_fs �/� �131"Please enter any prefix to filename" �0� �131"(i.e. :1.W. to save file to drive 1," �+� �131"directory W.) Press <RETURN> to" �� �131"finish entry." � �c_on �%� ''�12)�134;:� "PREFIX: "prefix$ � �c_off :� �(prefix$)<>0 � �prefix$,1)<>"." prefix$=prefix$+"." filename$=prefix$+filename$ �get_address � *: 4� �net_adfs >: H/� file%=5 fs$="NETWORK" � fs$="DISC (ADFS)" Rfilename$="SETCLOCK" \ �print_fs f.� �131"Please enter any pathname that you" p-� �131"require added to the beginning of" z+� �131"the filename. Press <RETURN> to" �� �131"finish entry." � �c_on �#� ''�134;:� "PATHNAME: "prefix$ � �c_off �:� �(prefix$)<>0 � �prefix$,1)<>"." prefix$=prefix$+"." �filename$=prefix$+filename$ ��get_address �� �: �� �print_fs �: �*� �131"Current filing system:"�135;fs$ �7� '�131"The program will be saved as"�135;filename$ �28,0,22,39,8 � : $� �get_address .: 83� ''�130" Where would you like the routine?"'' B=� file%>2 � �131"1. Serial/cassette port buffers (&900)"' L(� '�131"2. Econet workspace (&B00)"' V#� '�131"3. At another address"' `� jA=� t/� (file%>2 � (A>48 � A<52)) � (A>49 � A<52) ~� A=49 address=&900:� �� A=50 address=&B00:� �� A=51 �user_address:� �� �: �� �user_address �� � �c_on �2� '�131"Please enter the address you require:" �� '�14)�134;"&"; �address=�hex_input � �c_off �� : � �hex_input : =�(hex_input) � &FFFF (: 2� �hex_string(integer) <: FA%=integer � 256 PX%=integer � 256 Z� hex_string d =$hexaddr n: x� �file_sys �: �A%=0 �Y%=0 �=�(&FFDA) � &FF �: �� �save �: �!address$=�hex_string(address) �E� ("SAVE "+filename$+" 7000 +200 FFFF"+address$+" FFFF"+address$) �� �: � � �end ��26 � 0� '''�131" The program has been saved as:" *� '�19-(�(filename$)/2))�134;filename$ "5� ''�131"Don't forget to save THIS Basic program" ,0� �131" too, it contains the source code!" 6� '' @ �c_on J� T� ^: h� �assemble_tools r: |� pass%=0 � 2 � 2 �P%=code% �[OPT pass% �.hex_string �0STA &70 \Save bytes for future use �STX &71 � LDA #0 �2STA hexaddr \Clear hex string to nothing �STA hexaddr+1 �STA hexaddr+2 �STA hexaddr+3 �4LDA #&D \Set <CR> at end of hex string �STA hexaddr+4 �LDA &70 2� #&F \Find lower nybble of low byte /JSR convert \Find �II value of nybble &STA hexaddr+3 \Store in string &TXA 03� #&F \Find lower nybble of high byte :JSR convert \as above DSTA hexaddr+1 N5LDA &70 \Find higher nybble of low byte XLSR A:LSR A:LSR A:LSR A bJSR convert \as above lSTA hexaddr+2 v6LDA &71 \Find higher nybble of high byte �LSR A:LSR A:LSR A:LSR A �JSR convert \as above �STA hexaddr �RTS �B.convert \SUBROUTINE returns �II value of nybble in A �1CMP #10 \Is nybble alpha? (i.e. >9) �3BPL alpha \If so, jump to alpha routine �8CLC \Otherwise add 48 to it and return �ADC #48 �RTS �<.alpha \It's alpha so add 55 to it and return �CLC �ADC #55 RTS .hex_input 3LDX #0 \Set character counter/pointer 7.get_char \get a character from input stream *JSR osrdch 4,BCS error \Trap invalid character >CMP #13 H-BEQ end_entry \Detect and act upon <�> RCMP #127 \-BEQ delete \Detect and act upon <�> fHCMP #48 \Range check. Pass only 0-9 and A-E (no lower case) pBMI beep zCMP #71 �BPL beep �CMP #58 � BMI ok �CMP #65 �BMI beep �.ok �?CPX #4 \Detect sneaky try at entering a 5th digit �BEQ beep �,STA hexaddr,X \Add chracter to string �,INX \Update counter/pointer �-JSR oswrch \Put character on screen �JMP get_char �9.beep \Make a beep and go back to get_char LDA #7 JSR oswrch JMP get_char $'.error \Jump out on error .RTS 8$.delete \Action <�> key B CPX #0 LCBEQ beep \If nothing to delete, beep and go to get_char V LDA #8 `JSR oswrch jLDA #32 tJSR oswrch ~ LDA #8 �JSR oswrch �DEX �JMP get_char �-.end_entry \Exit collection routine �,CPX #4 \All 4 characters used? �BEQ evaluate �,CPX #0 \No characters entered? �BEQ quick_exit �4STX &70 \If not, pad with leading zeros � LDA #4 �SEC �1SBC &70 \Find how many spaces to pad STA &70 6DEX \Change X from counter to pointer TXA CLC (ADC &70 23TAY \Set Y to point at target byte <8.shift \Shift valid chars to end of string FLDA hexaddr,X PSTA hexaddr,Y ZDEY dDEX nBMI continue x JMP shift � .continue �(LDY #0 \Add leading zeros � LDA #48 \(�II "0") �.pad �STA hexaddr,Y �INY �CPY &70 �BNE pad �9.evaluate \Decode hex string to 2 byte integer �LDA hexaddr+3 �*JSR decode \Low nybble, low byte �STA &70 �+LDA hexaddr+2 \high nybble, low byte JSR decode ASL A:ASL A:ASL A:ASL A CLC ">ADC &70 \Add two nybbles together and store in Y ,TAY 6,LDA hexaddr+1 \Low nybble, high byte @JSR decode JSTA &70 T-LDA hexaddr \High nybble, high byte ^JSR decode hASL A:ASL A:ASL A:ASL A rCLC |>ADC &70 \Add two nybbles together and store in X �TAX �7TYA \Move low byte back into A & exit �RTS �/.decode \Nybble decode subroutine �!CMP #58 \Is it > 9? �BPL dec_alpha �*SEC \If not, subtract 48 �SBC #48 �RTS �.dec_alpha �4SEC \If it is, subtract 55 (ALPHA) �SBC #55 �RTS E.quick_exit \Used only if no characters entered (essential) LDA #0 TAX &RTS 0] :� pass% D� N: �
00000000 0d 00 0a 25 f4 20 53 45 54 43 4c 4f 43 4b 20 50 |...%. SETCLOCK P| 00000010 52 4f 47 52 41 4d 20 46 4f 52 20 4d 41 53 54 45 |ROGRAM FOR MASTE| 00000020 52 20 31 32 38 0d 00 14 19 f4 20 28 43 29 20 49 |R 128..... (C) I| 00000030 61 6e 20 53 74 75 62 62 73 20 31 39 38 36 0d 00 |an Stubbs 1986..| 00000040 1e 1a f4 20 52 45 51 55 49 52 45 53 20 42 42 43 |... REQUIRES BBC| 00000050 20 41 54 53 20 52 4f 4d 0d 00 28 05 3a 0d 00 32 | ATS ROM..(.:..2| 00000060 07 eb 20 37 0d 00 3c 0b d3 3d 26 37 30 30 30 0d |.. 7..<..=&7000.| 00000070 00 46 0f de 20 63 6f 64 65 25 20 32 38 30 0d 00 |.F.. code% 280..| 00000080 50 0f de 20 68 65 78 61 64 64 72 20 35 0d 00 5a |P.. hexaddr 5..Z| 00000090 10 6f 73 61 73 63 69 3d 26 46 46 45 33 0d 00 64 |.osasci=&FFE3..d| 000000a0 10 6f 73 72 64 63 68 3d 26 46 46 45 30 0d 00 6e |.osrdch=&FFE0..n| 000000b0 10 6f 73 77 72 63 68 3d 26 46 46 45 45 0d 00 78 |.oswrch=&FFEE..x| 000000c0 10 6f 73 62 79 74 65 3d 26 46 46 46 34 0d 00 82 |.osbyte=&FFF4...| 000000d0 10 6f 73 77 6f 72 64 3d 26 46 46 46 31 0d 00 8c |.osword=&FFF1...| 000000e0 0f 6f 73 63 6c 69 3d 26 46 46 46 37 0d 00 96 13 |.oscli=&FFF7....| 000000f0 f2 61 73 73 65 6d 62 6c 65 5f 74 6f 6f 6c 73 0d |.assemble_tools.| 00000100 00 a0 14 f2 61 73 73 65 6d 62 6c 65 28 26 37 30 |....assemble(&70| 00000110 30 30 29 0d 00 aa 11 f2 69 6e 73 74 72 75 63 74 |00).....instruct| 00000120 69 6f 6e 73 0d 00 b4 09 f2 64 65 6d 6f 0d 00 be |ions.....demo...| 00000130 11 f2 63 6f 6c 6c 65 63 74 5f 64 61 74 61 0d 00 |..collect_data..| 00000140 c8 16 f2 61 73 73 65 6d 62 6c 65 28 61 64 64 72 |...assemble(addr| 00000150 65 73 73 29 0d 00 d2 09 f2 73 61 76 65 0d 00 dc |ess).....save...| 00000160 08 f2 65 6e 64 0d 00 e6 05 3a 0d 00 f0 10 f4 20 |..end....:..... | 00000170 50 52 4f 43 45 44 55 52 45 53 0d 00 fa 05 3a 0d |PROCEDURES....:.| 00000180 01 04 17 dd 20 f2 61 73 73 65 6d 62 6c 65 28 6f |.... .assemble(o| 00000190 72 69 67 69 6e 29 0d 01 0e 05 3a 0d 01 18 15 70 |rigin)....:....p| 000001a0 61 72 61 25 3d 6f 72 69 67 69 6e 2b 26 31 45 30 |ara%=origin+&1E0| 000001b0 0d 01 22 15 e3 20 70 61 73 73 25 3d 34 20 b8 20 |..".. pass%=4 . | 000001c0 36 20 88 20 32 0d 01 2c 0d 50 25 3d 6f 72 69 67 |6 . 2..,.P%=orig| 000001d0 69 6e 0d 01 36 0c 4f 25 3d 26 37 30 30 30 0d 01 |in..6.O%=&7000..| 000001e0 40 0e 5b 4f 50 54 20 70 61 73 73 25 0d 01 4a 0a |@.[OPT pass%..J.| 000001f0 2e 62 65 67 69 6e 0d 01 54 0b 4c 44 41 20 23 26 |.begin..T.LDA #&| 00000200 44 0d 01 5e 0d 53 54 41 20 70 61 72 61 25 0d 01 |D..^.STA para%..| 00000210 68 35 4a 53 52 20 74 74 78 5f 63 6f 6d 6d 61 6e |h5JSR ttx_comman| 00000220 64 20 20 20 5c 53 77 69 74 63 68 20 6f 6e 20 54 |d \Switch on T| 00000230 65 6c 65 78 74 65 78 74 20 69 6e 74 65 72 72 75 |elextext interru| 00000240 70 74 73 0d 01 72 0a 4c 44 41 20 23 31 0d 01 7c |pts..r.LDA #1..|| 00000250 0d 53 54 41 20 70 61 72 61 25 0d 01 86 0a 4c 44 |.STA para%....LD| 00000260 41 20 23 30 0d 01 90 0f 53 54 41 20 70 61 72 61 |A #0....STA para| 00000270 25 2b 31 0d 01 9a 2b 4a 53 52 20 74 74 78 5f 63 |%+1...+JSR ttx_c| 00000280 6f 6d 6d 61 6e 64 20 20 20 5c 53 65 74 20 63 68 |ommand \Set ch| 00000290 61 6e 6e 65 6c 20 74 6f 20 42 42 43 2d 31 0d 01 |annel to BBC-1..| 000002a0 a4 0d 4a 53 52 20 64 65 6c 61 79 0d 01 ae 0d 4a |..JSR delay....J| 000002b0 53 52 20 64 65 6c 61 79 0d 01 b8 0a 4c 44 41 20 |SR delay....LDA | 000002c0 23 31 0d 01 c2 4b 53 54 41 20 70 61 72 61 25 2d |#1...KSTA para%-| 000002d0 34 20 20 20 20 20 20 20 5c 53 65 74 20 6d 61 67 |4 \Set mag| 000002e0 61 7a 69 6e 65 20 6e 75 6d 62 65 72 20 74 6f 20 |azine number to | 000002f0 31 20 66 6f 72 20 42 42 43 2d 31 20 74 61 72 67 |1 for BBC-1 targ| 00000300 65 74 20 70 61 67 65 20 28 31 30 30 29 0d 01 cc |et page (100)...| 00000310 0b 4c 44 41 20 23 31 37 0d 01 d6 0d 53 54 41 20 |.LDA #17....STA | 00000320 70 61 72 61 25 0d 01 e0 33 4a 53 52 20 74 74 78 |para%...3JSR ttx| 00000330 5f 63 6f 6d 6d 61 6e 64 20 20 20 5c 52 65 61 64 |_command \Read| 00000340 20 54 65 6c 65 74 65 78 74 20 41 64 61 70 74 6f | Teletext Adapto| 00000350 72 20 53 74 61 74 75 73 0d 01 ea 0f 4c 44 41 20 |r Status....LDA | 00000360 70 61 72 61 25 2b 31 0d 01 f4 0c 43 4d 50 20 23 |para%+1....CMP #| 00000370 26 46 46 0d 01 fe 12 42 45 51 20 6e 6f 5f 61 64 |&FF....BEQ no_ad| 00000380 61 70 74 6f 72 0d 02 08 0a 43 4d 50 20 23 32 0d |aptor....CMP #2.| 00000390 02 12 13 42 45 51 20 61 64 61 70 74 6f 72 5f 6f |...BEQ adaptor_o| 000003a0 66 66 0d 02 1c 0a 43 4d 50 20 23 31 0d 02 26 11 |ff....CMP #1..&.| 000003b0 42 45 51 20 6e 6f 5f 73 69 67 6e 61 6c 0d 02 30 |BEQ no_signal..0| 000003c0 0d 4a 4d 50 20 73 74 61 72 74 0d 02 3a 0f 2e 6e |.JMP start..:..n| 000003d0 6f 5f 61 64 61 70 74 6f 72 0d 02 44 0c 4a 53 52 |o_adaptor..D.JSR| 000003e0 20 65 78 69 74 0d 02 4e 07 42 52 4b 0d 02 58 0c | exit..N.BRK..X.| 000003f0 45 51 55 42 20 26 46 46 0d 02 62 15 45 51 55 53 |EQUB &FF..b.EQUS| 00000400 20 22 4e 6f 20 41 64 61 70 74 6f 72 22 0d 02 6c | "No Adaptor"..l| 00000410 07 42 52 4b 0d 02 76 10 2e 61 64 61 70 74 6f 72 |.BRK..v..adaptor| 00000420 5f 6f 66 66 0d 02 80 0c 4a 53 52 20 65 78 69 74 |_off....JSR exit| 00000430 0d 02 8a 07 42 52 4b 0d 02 94 0b 45 51 55 42 20 |....BRK....EQUB | 00000440 35 30 0d 02 9e 16 45 51 55 53 20 22 41 64 61 70 |50....EQUS "Adap| 00000450 74 6f 72 20 6f 66 66 22 0d 02 a8 07 42 52 4b 0d |tor off"....BRK.| 00000460 02 b2 0e 2e 6e 6f 5f 73 69 67 6e 61 6c 0d 02 bc |....no_signal...| 00000470 0a 4c 44 41 20 23 31 0d 02 c6 0d 53 54 41 20 70 |.LDA #1....STA p| 00000480 61 72 61 25 0d 02 d0 0f 53 54 41 20 70 61 72 61 |ara%....STA para| 00000490 25 2b 31 0d 02 da 33 4a 53 52 20 74 74 78 5f 63 |%+1...3JSR ttx_c| 000004a0 6f 6d 6d 61 6e 64 20 20 20 20 20 20 20 20 5c 43 |ommand \C| 000004b0 68 61 6e 67 65 20 63 68 61 6e 6e 65 6c 20 74 6f |hange channel to| 000004c0 20 42 42 43 2d 32 0d 02 e4 0a 4c 44 41 20 23 32 | BBC-2....LDA #2| 000004d0 0d 02 ee 53 53 54 41 20 70 61 72 61 25 2d 34 20 |...SSTA para%-4 | 000004e0 20 20 20 20 20 20 20 20 20 20 20 5c 43 68 61 6e | \Chan| 000004f0 67 65 20 6d 61 67 61 7a 69 6e 65 20 6e 75 6d 62 |ge magazine numb| 00000500 65 72 20 6f 66 20 74 61 72 67 65 74 20 70 61 67 |er of target pag| 00000510 65 20 74 6f 20 32 20 28 32 30 30 29 2c 20 42 42 |e to 2 (200), BB| 00000520 43 2d 32 0d 02 f8 0d 4a 53 52 20 64 65 6c 61 79 |C-2....JSR delay| 00000530 0d 03 02 0d 4a 53 52 20 64 65 6c 61 79 0d 03 0c |....JSR delay...| 00000540 0d 4a 53 52 20 64 65 6c 61 79 0d 03 16 0d 4a 53 |.JSR delay....JS| 00000550 52 20 64 65 6c 61 79 0d 03 20 0b 4c 44 41 20 23 |R delay.. .LDA #| 00000560 31 37 0d 03 2a 0d 53 54 41 20 70 61 72 61 25 0d |17..*.STA para%.| 00000570 03 34 35 4a 53 52 20 74 74 78 5f 63 6f 6d 6d 61 |.45JSR ttx_comma| 00000580 6e 64 20 20 20 20 20 20 20 20 5c 52 65 61 64 20 |nd \Read | 00000590 41 64 61 70 74 6f 72 20 53 74 61 74 75 73 20 61 |Adaptor Status a| 000005a0 67 61 69 6e 0d 03 3e 0f 4c 44 41 20 70 61 72 61 |gain..>.LDA para| 000005b0 25 2b 31 0d 03 48 45 42 45 51 20 73 74 61 72 74 |%+1..HEBEQ start| 000005c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 49 | \I| 000005d0 66 20 73 69 67 6e 61 6c 20 66 6f 75 6e 64 20 74 |f signal found t| 000005e0 68 65 6e 20 73 74 61 72 74 20 70 72 6f 67 72 61 |hen start progra| 000005f0 6d 20 70 72 6f 70 65 72 0d 03 52 0c 4a 53 52 20 |m proper..R.JSR | 00000600 65 78 69 74 0d 03 5c 2c 42 52 4b 20 20 20 20 20 |exit..\,BRK | 00000610 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c | \| 00000620 65 6c 73 65 20 66 6c 61 67 20 65 72 72 6f 72 2e |else flag error.| 00000630 0d 03 66 0b 45 51 55 42 20 35 31 0d 03 70 14 45 |..f.EQUB 51..p.E| 00000640 51 55 53 20 22 4e 6f 20 43 45 45 46 41 58 22 0d |QUS "No CEEFAX".| 00000650 03 7a 07 42 52 4b 0d 03 84 0a 2e 73 74 61 72 74 |.z.BRK.....start| 00000660 0d 03 8e 0a 4c 44 41 20 23 37 0d 03 98 0d 53 54 |....LDA #7....ST| 00000670 41 20 70 61 72 61 25 0d 03 a2 0a 4c 44 41 20 23 |A para%....LDA #| 00000680 31 0d 03 ac 0f 53 54 41 20 70 61 72 61 25 2b 31 |1....STA para%+1| 00000690 0d 03 b6 45 4a 53 52 20 74 74 78 5f 63 6f 6d 6d |...EJSR ttx_comm| 000006a0 61 6e 64 20 20 20 20 20 5c 53 65 74 20 70 61 67 |and \Set pag| 000006b0 65 20 63 61 70 74 75 72 65 20 72 6f 75 74 69 6e |e capture routin| 000006c0 65 20 74 6f 20 67 65 74 20 48 45 41 44 45 52 20 |e to get HEADER | 000006d0 86 20 ee 4c 59 0d 03 c0 0a 4c 44 41 20 23 30 0d |. .LY....LDA #0.| 000006e0 03 ca 2f 53 54 41 20 70 61 72 61 25 2b 31 36 20 |../STA para%+16 | 000006f0 20 20 20 20 20 20 20 5c 53 65 74 20 68 65 61 64 | \Set head| 00000700 65 72 20 64 65 74 65 63 74 20 62 79 74 65 0d 03 |er detect byte..| 00000710 d4 0a 4c 44 41 20 23 35 0d 03 de 0d 53 54 41 20 |..LDA #5....STA | 00000720 70 61 72 61 25 0d 03 e8 0b 4c 44 41 20 23 31 38 |para%....LDA #18| 00000730 0d 03 f2 0f 53 54 41 20 70 61 72 61 25 2b 31 0d |....STA para%+1.| 00000740 03 fc 0f 4c 44 41 20 70 61 72 61 25 2d 34 0d 04 |...LDA para%-4..| 00000750 06 0f 53 54 41 20 70 61 72 61 25 2b 32 0d 04 10 |..STA para%+2...| 00000760 0a 4c 44 41 20 23 30 0d 04 1a 0f 53 54 41 20 70 |.LDA #0....STA p| 00000770 61 72 61 25 2b 33 0d 04 24 0c 4c 44 41 20 23 26 |ara%+3..$.LDA #&| 00000780 33 46 0d 04 2e 0f 53 54 41 20 70 61 72 61 25 2b |3F....STA para%+| 00000790 34 0d 04 38 0c 4c 44 41 20 23 26 37 46 0d 04 42 |4..8.LDA #&7F..B| 000007a0 0f 53 54 41 20 70 61 72 61 25 2b 35 0d 04 4c 16 |.STA para%+5..L.| 000007b0 4c 44 41 20 23 28 70 61 72 61 25 20 83 20 32 35 |LDA #(para% . 25| 000007c0 36 29 0d 04 56 0f 53 54 41 20 70 61 72 61 25 2b |6)..V.STA para%+| 000007d0 36 0d 04 60 16 4c 44 41 20 23 28 70 61 72 61 25 |6..`.LDA #(para%| 000007e0 20 81 20 32 35 36 29 0d 04 6a 0f 53 54 41 20 70 | . 256)..j.STA p| 000007f0 61 72 61 25 2b 37 0d 04 74 48 4a 53 52 20 74 74 |ara%+7..tHJSR tt| 00000800 78 5f 63 6f 6d 6d 61 6e 64 20 20 20 20 20 5c 47 |x_command \G| 00000810 65 74 20 70 61 67 65 20 31 30 30 20 66 72 6f 6d |et page 100 from| 00000820 20 43 45 45 46 41 58 20 28 42 42 43 2d 31 29 20 | CEEFAX (BBC-1) | 00000830 6f 72 20 32 30 30 20 28 42 42 43 2d 32 29 0d 04 |or 200 (BBC-2)..| 00000840 7e 4a 4c 44 41 20 23 26 46 46 20 20 20 20 20 20 |~JLDA #&FF | 00000850 20 20 20 20 20 20 5c 53 65 74 20 22 67 69 76 65 | \Set "give| 00000860 20 75 70 20 6c 6f 6f 6b 69 6e 67 20 66 6f 72 20 | up looking for | 00000870 68 65 61 64 65 72 22 20 74 68 72 65 73 68 6f 6c |header" threshol| 00000880 64 20 62 79 74 65 20 31 0d 04 88 0f 53 54 41 20 |d byte 1....STA | 00000890 70 61 72 61 25 2d 31 0d 04 92 23 4c 44 41 20 23 |para%-1...#LDA #| 000008a0 26 33 46 20 20 20 20 20 20 20 20 20 20 20 20 5c |&3F \| 000008b0 53 65 74 20 62 79 74 65 20 32 0d 04 9c 0f 53 54 |Set byte 2....ST| 000008c0 41 20 70 61 72 61 25 2d 32 0d 04 a6 14 2e 74 65 |A para%-2.....te| 000008d0 73 74 5f 66 6f 72 5f 68 65 61 64 65 72 0d 04 b0 |st_for_header...| 000008e0 10 4c 44 41 20 70 61 72 61 25 2b 31 36 0d 04 ba |.LDA para%+16...| 000008f0 30 42 4e 45 20 67 65 74 5f 74 69 6d 65 20 20 20 |0BNE get_time | 00000900 20 20 20 20 20 5c 43 68 65 63 6b 20 69 66 20 68 | \Check if h| 00000910 65 61 64 65 72 20 61 72 72 69 76 65 64 0d 04 c4 |eader arrived...| 00000920 3b 4c 44 59 20 23 30 20 20 20 20 20 20 20 20 20 |;LDY #0 | 00000930 20 20 20 20 20 5c 49 66 20 6e 6f 74 2c 20 77 61 | \If not, wa| 00000940 69 74 20 61 20 62 69 74 20 74 68 65 6e 20 74 65 |it a bit then te| 00000950 73 74 20 61 67 61 69 6e 0d 04 ce 09 2e 77 61 69 |st again.....wai| 00000960 74 0d 04 d8 07 4e 4f 50 0d 04 e2 07 44 45 59 0d |t....NOP....DEY.| 00000970 04 ec 0c 42 4e 45 20 77 61 69 74 0d 04 f6 0f 44 |...BNE wait....D| 00000980 45 43 20 70 61 72 61 25 2d 31 0d 05 00 17 42 4e |EC para%-1....BN| 00000990 45 20 74 65 73 74 5f 66 6f 72 5f 68 65 61 64 65 |E test_for_heade| 000009a0 72 0d 05 0a 0f 44 45 43 20 70 61 72 61 25 2d 32 |r....DEC para%-2| 000009b0 0d 05 14 17 42 4e 45 20 74 65 73 74 5f 66 6f 72 |....BNE test_for| 000009c0 5f 68 65 61 64 65 72 0d 05 1e 0c 4a 53 52 20 65 |_header....JSR e| 000009d0 78 69 74 0d 05 28 07 42 52 4b 0d 05 32 0b 45 51 |xit..(.BRK..2.EQ| 000009e0 55 42 20 35 32 0d 05 3c 1f 45 51 55 53 20 22 43 |UB 52..<.EQUS "C| 000009f0 61 6e 27 74 20 66 69 6e 64 20 74 69 6d 65 2f 64 |an't find time/d| 00000a00 61 74 65 22 0d 05 46 07 42 52 4b 0d 05 50 0d 2e |ate"..F.BRK..P..| 00000a10 67 65 74 5f 74 69 6d 65 0d 05 5a 0c 5c 4c 44 41 |get_time..Z.\LDA| 00000a20 20 23 31 34 0d 05 64 0e 5c 53 54 41 20 70 61 72 | #14..d.\STA par| 00000a30 61 25 0d 05 6e 4b 5c 4a 53 52 20 74 74 78 5f 63 |a%..nK\JSR ttx_c| 00000a40 6f 6d 6d 61 6e 64 20 20 20 20 20 20 5c 43 6c 65 |ommand \Cle| 00000a50 61 72 20 70 61 67 65 20 67 72 61 62 62 65 72 20 |ar page grabber | 00000a60 73 6f 20 69 74 20 64 6f 65 73 6e 27 74 20 6f 76 |so it doesn't ov| 00000a70 65 72 2d 77 72 69 74 65 20 64 61 74 61 0d 05 78 |er-write data..x| 00000a80 0e 2e 74 72 79 5f 61 67 61 69 6e 0d 05 82 0b 4c |..try_again....L| 00000a90 44 41 20 23 32 31 0d 05 8c 0d 53 54 41 20 70 61 |DA #21....STA pa| 00000aa0 72 61 25 0d 05 96 2c 4a 53 52 20 74 74 78 5f 63 |ra%...,JSR ttx_c| 00000ab0 6f 6d 6d 61 6e 64 20 20 20 20 20 20 5c 47 65 74 |ommand \Get| 00000ac0 20 74 69 6d 65 20 66 72 6f 6d 20 54 53 44 50 0d | time from TSDP.| 00000ad0 05 a0 10 4c 44 41 20 70 61 72 61 25 2b 31 30 0d |...LDA para%+10.| 00000ae0 05 aa 33 43 4d 50 20 23 26 46 46 20 20 20 20 20 |..3CMP #&FF | 00000af0 20 20 20 20 20 20 20 20 5c 54 65 73 74 20 74 6f | \Test to| 00000b00 20 73 65 65 20 69 66 20 74 69 6d 65 20 66 6f 75 | see if time fou| 00000b10 6e 64 0d 05 b4 26 42 45 51 20 74 72 79 5f 61 67 |nd...&BEQ try_ag| 00000b20 61 69 6e 20 20 20 20 20 20 20 20 5c 52 65 74 72 |ain \Retr| 00000b30 79 20 69 66 20 6e 6f 74 0d 05 be 4a 4a 53 52 20 |y if not...JJSR | 00000b40 64 65 6c 61 79 20 20 20 20 20 20 20 20 20 20 20 |delay | 00000b50 20 5c 31 20 73 65 63 6f 6e 64 20 64 65 6c 61 79 | \1 second delay| 00000b60 20 74 6f 20 62 6f 64 67 65 20 43 4d 4f 53 20 73 | to bodge CMOS s| 00000b70 65 74 20 72 6f 75 74 69 6e 65 20 74 6f 20 67 69 |et routine to gi| 00000b80 76 65 0d 05 c8 28 4a 53 52 20 64 65 6c 61 79 20 |ve...(JSR delay | 00000b90 20 20 20 20 20 20 20 20 20 20 20 5c 63 6f 72 72 | \corr| 00000ba0 65 63 74 20 72 65 73 75 6c 74 0d 05 d2 0d 4a 53 |ect result....JS| 00000bb0 52 20 64 65 6c 61 79 0d 05 dc 0a 4c 44 41 20 23 |R delay....LDA #| 00000bc0 38 0d 05 e6 0d 53 54 41 20 70 61 72 61 25 0d 05 |8....STA para%..| 00000bd0 f0 0b 4c 44 41 20 23 26 46 0d 05 fa 14 4c 44 58 |..LDA #&F....LDX| 00000be0 20 23 70 61 72 61 25 20 83 20 32 35 36 0d 06 04 | #para% . 256...| 00000bf0 14 4c 44 59 20 23 70 61 72 61 25 20 81 20 32 35 |.LDY #para% . 25| 00000c00 36 0d 06 0e 30 4a 53 52 20 6f 73 77 6f 72 64 20 |6...0JSR osword | 00000c10 20 20 20 20 20 20 20 20 20 20 5c 53 65 74 20 74 | \Set t| 00000c20 69 6d 65 20 69 6e 20 43 4d 4f 53 20 63 6c 6f 63 |ime in CMOS cloc| 00000c30 6b 0d 06 18 0d 2e 67 65 74 5f 64 61 74 65 0d 06 |k.....get_date..| 00000c40 22 0b 4c 44 41 20 23 32 32 0d 06 2c 0d 53 54 41 |".LDA #22..,.STA| 00000c50 20 70 61 72 61 25 0d 06 36 45 4a 53 52 20 74 74 | para%..6EJSR tt| 00000c60 78 5f 63 6f 6d 6d 61 6e 64 20 20 20 20 20 20 5c |x_command \| 00000c70 47 65 74 20 64 61 74 65 20 66 72 6f 6d 20 54 53 |Get date from TS| 00000c80 44 50 20 28 4f 6e 6c 79 20 79 65 61 72 20 77 69 |DP (Only year wi| 00000c90 6c 6c 20 62 65 20 75 73 65 64 29 0d 06 40 10 4c |ll be used)..@.L| 00000ca0 44 41 20 70 61 72 61 25 2b 31 32 0d 06 4a 34 43 |DA para%+12..J4C| 00000cb0 4d 50 20 23 26 46 46 20 20 20 20 20 20 20 20 20 |MP #&FF | 00000cc0 20 20 20 20 5c 43 68 65 63 6b 20 74 6f 20 73 65 | \Check to se| 00000cd0 65 20 69 66 20 64 61 74 65 20 66 6f 75 6e 64 0d |e if date found.| 00000ce0 06 54 27 42 45 51 20 67 65 74 5f 64 61 74 65 20 |.T'BEQ get_date | 00000cf0 20 20 20 20 20 20 20 20 5c 52 65 74 72 79 20 69 | \Retry i| 00000d00 66 20 6e 6f 74 2e 0d 06 5e 46 4c 44 59 20 23 26 |f not...^FLDY #&| 00000d10 37 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c |7 \| 00000d20 4d 6f 76 65 20 79 65 61 72 20 74 6f 20 63 6f 72 |Move year to cor| 00000d30 72 65 63 74 20 70 6f 73 2e 20 69 6e 20 70 61 72 |rect pos. in par| 00000d40 61 6d 65 74 65 72 20 62 6c 6f 63 6b 0d 06 68 0c |ameter block..h.| 00000d50 4c 44 58 20 23 26 32 31 0d 06 72 0d 2e 6e 65 78 |LDX #&21..r..nex| 00000d60 74 63 68 61 72 0d 06 7c 0f 4c 44 41 20 70 61 72 |tchar..|.LDA par| 00000d70 61 25 2c 59 0d 06 86 0f 53 54 41 20 70 61 72 61 |a%,Y....STA para| 00000d80 25 2c 58 0d 06 90 07 49 4e 59 0d 06 9a 07 49 4e |%,X....INY....IN| 00000d90 58 0d 06 a4 0c 43 50 58 20 23 26 32 35 0d 06 ae |X....CPX #&25...| 00000da0 10 42 4e 45 20 6e 65 78 74 63 68 61 72 0d 06 b8 |.BNE nextchar...| 00000db0 0f 4c 44 41 20 23 97 28 22 2c 22 29 0d 06 c2 30 |.LDA #.(",")...0| 00000dc0 53 54 41 20 70 61 72 61 25 2b 26 31 39 20 20 20 |STA para%+&19 | 00000dd0 20 20 20 20 20 5c 49 6e 73 65 72 74 20 63 6f 6d | \Insert com| 00000de0 6d 61 20 61 66 74 65 72 20 64 61 79 0d 06 c4 0f |ma after day....| 00000df0 4c 44 41 20 23 97 28 22 20 22 29 0d 06 c6 3d 53 |LDA #.(" ")...=S| 00000e00 54 41 20 70 61 72 61 25 2b 26 32 30 20 20 20 20 |TA para%+&20 | 00000e10 20 20 20 20 5c 49 6e 73 65 72 74 20 73 70 61 63 | \Insert spac| 00000e20 65 20 62 65 74 77 65 65 6e 20 6d 6f 6e 74 68 20 |e between month | 00000e30 61 6e 64 20 79 65 61 72 0d 06 cc 4a 4c 44 59 20 |and year...JLDY | 00000e40 23 26 31 36 20 20 20 20 20 20 20 20 20 20 20 20 |#&16 | 00000e50 20 5c 54 68 65 6e 20 65 6e 73 75 72 65 20 74 68 | \Then ensure th| 00000e60 65 20 72 65 73 74 20 6f 66 20 74 68 65 20 64 61 |e rest of the da| 00000e70 74 65 20 69 73 20 53 54 41 4e 44 41 52 44 20 97 |te is STANDARD .| 00000e80 49 49 0d 06 d6 09 2e 6e 65 78 74 0d 06 e0 0f 4c |II.....next....L| 00000e90 44 41 20 70 61 72 61 25 2c 59 0d 06 ea 0a 80 20 |DA para%,Y..... | 00000ea0 23 26 37 46 0d 06 f4 0f 53 54 41 20 70 61 72 61 |#&7F....STA para| 00000eb0 25 2c 59 0d 06 fe 07 49 4e 59 0d 07 08 0c 43 50 |%,Y....INY....CP| 00000ec0 59 20 23 26 32 36 0d 07 12 0c 42 4e 45 20 6e 65 |Y #&26....BNE ne| 00000ed0 78 74 0d 07 1c 0b 4c 44 41 20 23 26 46 0d 07 26 |xt....LDA #&F..&| 00000ee0 11 53 54 41 20 70 61 72 61 25 2b 26 31 35 0d 07 |.STA para%+&15..| 00000ef0 30 0b 4c 44 41 20 23 26 46 0d 07 3a 1a 4c 44 58 |0.LDA #&F..:.LDX| 00000f00 20 23 28 70 61 72 61 25 2b 26 31 35 29 20 83 20 | #(para%+&15) . | 00000f10 32 35 36 0d 07 44 1a 4c 44 59 20 23 28 70 61 72 |256..D.LDY #(par| 00000f20 61 25 2b 26 31 35 29 20 81 20 32 35 36 0d 07 4e |a%+&15) . 256..N| 00000f30 2b 4a 53 52 20 6f 73 77 6f 72 64 20 20 20 20 20 |+JSR osword | 00000f40 20 20 20 20 20 20 5c 53 65 74 20 43 4d 4f 53 20 | \Set CMOS | 00000f50 63 61 6c 65 6e 64 65 72 0d 07 58 15 4c 44 58 20 |calender..X.LDX | 00000f60 23 28 74 69 6d 65 20 83 20 32 35 36 29 0d 07 62 |#(time . 256)..b| 00000f70 15 4c 44 59 20 23 28 74 69 6d 65 20 81 20 32 35 |.LDY #(time . 25| 00000f80 36 29 0d 07 6c 24 4a 53 52 20 6f 73 63 6c 69 20 |6)..l$JSR oscli | 00000f90 20 20 20 20 20 20 20 20 20 20 20 5c 50 65 72 66 | \Perf| 00000fa0 6f 72 6d 20 2a 91 0d 07 76 48 2e 65 78 69 74 20 |orm *...vH.exit | 00000fb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c | \| 00000fc0 52 65 73 65 74 20 70 72 65 76 69 6f 75 73 20 76 |Reset previous v| 00000fd0 61 6c 75 65 73 2c 20 73 77 69 74 63 68 20 6f 66 |alues, switch of| 00000fe0 66 20 74 74 78 20 61 6e 64 20 65 78 69 74 0d 07 |f ttx and exit..| 00000ff0 80 0a 4c 44 41 20 23 37 0d 07 8a 0d 53 54 41 20 |..LDA #7....STA | 00001000 70 61 72 61 25 0d 07 94 0b 4c 44 41 20 23 33 30 |para%....LDA #30| 00001010 0d 07 9e 0f 53 54 41 20 70 61 72 61 25 2b 31 0d |....STA para%+1.| 00001020 07 a8 3a 4a 53 52 20 74 74 78 5f 63 6f 6d 6d 61 |..:JSR ttx_comma| 00001030 6e 64 20 20 20 20 20 20 5c 52 65 73 65 74 20 6e |nd \Reset n| 00001040 6f 2e 20 6f 66 20 72 6f 77 73 20 63 61 70 74 75 |o. of rows captu| 00001050 72 65 64 20 74 6f 20 33 30 0d 07 b2 0c 5c 4c 44 |red to 30....\LD| 00001060 41 20 23 31 34 0d 07 bc 0e 5c 53 54 41 20 70 61 |A #14....\STA pa| 00001070 72 61 25 0d 07 c6 2d 5c 4a 53 52 20 74 74 78 5f |ra%...-\JSR ttx_| 00001080 63 6f 6d 6d 61 6e 64 20 20 20 20 20 20 5c 43 6c |command \Cl| 00001090 65 61 72 20 70 61 67 65 20 67 72 61 62 62 65 72 |ear page grabber| 000010a0 0d 07 d0 0b 4c 44 41 20 23 31 32 0d 07 da 0d 53 |....LDA #12....S| 000010b0 54 41 20 70 61 72 61 25 0d 07 e4 38 4a 53 52 20 |TA para%...8JSR | 000010c0 74 74 78 5f 63 6f 6d 6d 61 6e 64 20 20 20 20 20 |ttx_command | 000010d0 20 5c 53 77 69 74 63 68 20 6f 66 66 20 54 65 6c | \Switch off Tel| 000010e0 65 74 65 78 74 20 69 6e 74 65 72 72 75 70 74 73 |etext interrupts| 000010f0 0d 07 ee 07 52 54 53 0d 07 f8 2f 2e 74 74 78 5f |....RTS.../.ttx_| 00001100 63 6f 6d 6d 61 6e 64 20 20 20 20 20 20 20 20 20 |command | 00001110 5c 54 74 78 20 4f 53 57 4f 52 44 20 73 75 62 72 |\Ttx OSWORD subr| 00001120 6f 75 74 69 6e 65 0d 08 02 0c 4c 44 41 20 23 26 |outine....LDA #&| 00001130 37 41 0d 08 0c 14 4c 44 58 20 23 70 61 72 61 25 |7A....LDX #para%| 00001140 20 83 20 32 35 36 0d 08 16 14 4c 44 59 20 23 70 | . 256....LDY #p| 00001150 61 72 61 25 20 81 20 32 35 36 0d 08 20 0e 4a 53 |ara% . 256.. .JS| 00001160 52 20 6f 73 77 6f 72 64 0d 08 2a 07 52 54 53 0d |R osword..*.RTS.| 00001170 08 34 44 2e 64 65 6c 61 79 20 20 20 20 20 20 20 |.4D.delay | 00001180 20 20 20 20 20 20 20 20 5c 44 6f 65 73 20 6e 6f | \Does no| 00001190 74 68 69 6e 67 20 66 6f 72 20 61 62 6f 75 74 20 |thing for about | 000011a0 61 20 74 68 69 72 64 20 6f 66 20 61 20 73 65 63 |a third of a sec| 000011b0 6f 6e 64 0d 08 3e 0c 4c 44 58 20 23 26 46 46 0d |ond..>.LDX #&FF.| 000011c0 08 48 0c 4c 44 59 20 23 26 46 46 0d 08 52 0f 2e |.H.LDY #&FF..R..| 000011d0 64 65 6c 61 79 5f 6c 6f 6f 70 0d 08 5c 07 44 45 |delay_loop..\.DE| 000011e0 59 0d 08 66 0b 4e 4f 50 3a 4e 4f 50 0d 08 70 12 |Y..f.NOP:NOP..p.| 000011f0 42 4e 45 20 64 65 6c 61 79 5f 6c 6f 6f 70 0d 08 |BNE delay_loop..| 00001200 7a 07 44 45 58 0d 08 84 12 42 4e 45 20 64 65 6c |z.DEX....BNE del| 00001210 61 79 5f 6c 6f 6f 70 0d 08 8e 07 52 54 53 0d 08 |ay_loop....RTS..| 00001220 98 09 2e 74 69 6d 65 0d 08 a2 0e 45 51 55 53 20 |...time....EQUS | 00001230 22 54 49 2e 22 0d 08 ac 0b 45 51 55 42 20 26 44 |"TI."....EQUB &D| 00001240 0d 08 b6 08 2e 74 65 6c 0d 08 c0 0d 45 51 55 53 |.....tel....EQUS| 00001250 20 22 42 2e 22 0d 08 ca 0b 45 51 55 42 20 26 44 | "B."....EQUB &D| 00001260 0d 08 d4 05 5d 0d 08 de 0b ed 20 70 61 73 73 25 |....]..... pass%| 00001270 0d 08 e8 05 e1 0d 08 f2 05 3a 0d 08 fc 13 dd 20 |.........:..... | 00001280 f2 69 6e 73 74 72 75 63 74 69 6f 6e 73 0d 09 06 |.instructions...| 00001290 05 3a 0d 09 10 05 db 0d 09 1a 2a f1 20 bd 31 34 |.:........*. .14| 000012a0 31 bd 31 33 30 22 20 20 20 20 20 53 65 74 63 6c |1.130" Setcl| 000012b0 6f 63 6b 20 49 6e 73 74 72 75 63 74 69 6f 6e 73 |ock Instructions| 000012c0 22 0d 09 24 2a f1 20 bd 31 34 31 bd 31 33 30 22 |"..$*. .141.130"| 000012d0 20 20 20 20 20 53 65 74 63 6c 6f 63 6b 20 49 6e | Setclock In| 000012e0 73 74 72 75 63 74 69 6f 6e 73 22 0d 09 2e 11 ef |structions".....| 000012f0 32 38 2c 30 2c 32 33 2c 33 39 2c 33 0d 09 38 2f |28,0,23,39,3..8/| 00001300 f1 20 22 53 45 54 43 4c 4f 43 4b 20 67 65 74 73 |. "SETCLOCK gets| 00001310 20 74 68 65 20 64 61 74 65 20 61 6e 64 20 74 69 | the date and ti| 00001320 6d 65 20 66 72 6f 6d 20 20 20 22 0d 09 42 2f f1 |me from "..B/.| 00001330 20 22 43 45 45 46 41 58 20 61 6e 64 20 73 65 74 | "CEEFAX and set| 00001340 73 20 74 68 65 20 4d 61 73 74 65 72 27 73 20 69 |s the Master's i| 00001350 6e 74 65 72 6e 61 6c 20 20 22 0d 09 4c 2f f1 20 |nternal "..L/. | 00001360 22 43 4d 4f 53 20 63 61 6c 65 6e 64 65 72 2f 63 |"CMOS calender/c| 00001370 6c 6f 63 6b 2e 20 49 74 20 75 73 65 73 20 42 42 |lock. It uses BB| 00001380 43 2d 31 20 62 79 20 20 22 0d 09 56 2f f1 20 22 |C-1 by "..V/. "| 00001390 64 65 66 61 75 6c 74 20 62 75 74 2c 20 69 66 20 |default but, if | 000013a0 69 74 20 63 61 6e 6e 6f 74 20 66 69 6e 64 20 61 |it cannot find a| 000013b0 6e 79 20 20 20 20 20 22 0d 09 60 2f f1 20 22 54 |ny "..`/. "T| 000013c0 65 6c 65 74 65 78 74 20 6f 6e 20 42 42 43 2d 31 |eletext on BBC-1| 000013d0 2c 20 69 74 20 77 69 6c 6c 20 74 72 79 20 42 42 |, it will try BB| 000013e0 43 2d 32 2e 20 20 22 0d 09 6a 2f f1 20 22 49 74 |C-2. "..j/. "It| 000013f0 20 69 73 2c 20 6f 66 20 63 6f 75 72 73 65 2c 20 | is, of course, | 00001400 6f 6e 6c 79 20 6f 66 20 76 61 6c 75 65 20 74 6f |only of value to| 00001410 20 20 20 20 20 22 0d 09 74 2a f1 20 22 75 73 65 | "..t*. "use| 00001420 72 73 20 6f 66 20 74 68 65 20 4d 61 73 74 65 72 |rs of the Master| 00001430 20 61 6e 64 20 73 6f 20 75 73 65 20 68 61 73 22 | and so use has"| 00001440 0d 09 7e 2f f1 20 22 62 65 65 6e 20 6d 61 64 65 |..~/. "been made| 00001450 20 6f 66 20 66 61 63 69 6c 69 74 69 65 73 20 70 | of facilities p| 00001460 72 6f 76 69 64 65 64 20 6f 6e 6c 79 20 20 22 0d |rovided only ".| 00001470 09 88 2f f1 20 22 6f 6e 20 74 68 61 74 20 6d 61 |../. "on that ma| 00001480 63 68 69 6e 65 2e 20 54 68 65 20 70 72 6f 67 72 |chine. The progr| 00001490 61 6d 20 75 73 65 73 20 20 20 20 20 20 22 0d 09 |am uses "..| 000014a0 92 2f f1 20 22 4f 53 57 4f 52 44 20 72 6f 75 74 |./. "OSWORD rout| 000014b0 69 6e 65 73 20 70 72 6f 76 69 64 65 64 20 62 79 |ines provided by| 000014c0 20 74 68 65 20 6e 65 77 20 42 42 43 22 0d 09 9c | the new BBC"...| 000014d0 2f f1 20 22 41 54 53 20 52 4f 4d 2e 20 49 74 20 |/. "ATS ROM. It | 000014e0 69 73 20 6e 6f 74 20 63 6f 6d 70 61 74 69 62 6c |is not compatibl| 000014f0 65 20 77 69 74 68 20 54 46 53 2e 22 0d 09 a6 2f |e with TFS.".../| 00001500 f1 20 22 20 20 20 54 68 69 73 20 42 61 73 69 63 |. " This Basic| 00001510 20 70 72 6f 67 72 61 6d 20 77 69 6c 6c 20 67 65 | program will ge| 00001520 6e 65 72 61 74 65 20 74 68 65 22 0d 09 b0 2f f1 |nerate the".../.| 00001530 20 22 6d 61 63 68 69 6e 65 20 63 6f 64 65 20 72 | "machine code r| 00001540 6f 75 74 69 6e 65 20 53 45 54 43 4c 4f 43 4b 2e |outine SETCLOCK.| 00001550 20 59 6f 75 20 77 69 6c 6c 22 0d 09 ba 2f f1 20 | You will".../. | 00001560 22 62 65 20 61 62 6c 65 20 74 6f 20 63 68 6f 6f |"be able to choo| 00001570 73 65 20 77 68 65 72 65 20 69 74 20 77 69 6c 6c |se where it will| 00001580 20 72 75 6e 20 69 6e 20 22 0d 09 c4 2f f1 20 22 | run in ".../. "| 00001590 6d 65 6d 6f 72 79 2e 20 54 68 65 20 66 69 6c 65 |memory. The file| 000015a0 6e 61 6d 65 20 67 69 76 65 6e 20 74 6f 20 74 68 |name given to th| 000015b0 65 20 63 6f 64 65 20 22 0d 09 ce 2f f1 20 22 77 |e code ".../. "w| 000015c0 69 6c 6c 20 64 65 70 65 6e 64 20 6f 6e 20 74 68 |ill depend on th| 000015d0 65 20 66 69 6c 69 6e 67 20 73 79 73 74 65 6d 20 |e filing system | 000015e0 79 6f 75 20 20 20 22 0d 09 d8 2c f1 20 22 61 72 |you "...,. "ar| 000015f0 65 20 75 73 69 6e 67 20 61 74 20 74 68 65 20 6d |e using at the m| 00001600 6f 6d 65 6e 74 2c 20 61 73 20 77 69 6c 6c 20 74 |oment, as will t| 00001610 68 65 22 0d 09 e2 2d f1 20 22 63 68 6f 69 63 65 |he"...-. "choice| 00001620 20 6f 66 20 61 73 73 65 6d 62 6c 79 20 61 64 64 | of assembly add| 00001630 72 65 73 73 65 73 20 6f 66 66 65 72 65 64 2e 22 |resses offered."| 00001640 0d 09 ec 0a f2 73 70 61 63 65 0d 09 f6 2f f1 20 |.....space.../. | 00001650 22 54 68 65 20 62 65 73 74 20 61 64 64 72 65 73 |"The best addres| 00001660 73 20 66 6f 72 20 6d 6f 73 74 20 75 73 65 72 73 |s for most users| 00001670 20 77 69 6c 6c 20 62 65 22 0d 0a 00 2f f1 20 22 | will be".../. "| 00001680 26 42 30 30 2e 20 54 68 69 73 20 69 73 20 45 63 |&B00. This is Ec| 00001690 6f 6e 65 74 20 77 6f 72 6b 73 70 61 63 65 20 61 |onet workspace a| 000016a0 6e 64 20 77 69 6c 6c 22 0d 0a 0a 2f f1 20 22 62 |nd will".../. "b| 000016b0 65 20 75 6e 75 73 65 64 20 69 6e 20 74 68 65 20 |e unused in the | 000016c0 6d 61 6a 6f 72 69 74 79 20 6f 66 20 63 61 73 65 |majority of case| 000016d0 73 2e 20 49 66 20 22 0d 0a 14 2f f1 20 22 79 6f |s. If ".../. "yo| 000016e0 75 20 61 72 65 20 75 73 69 6e 67 20 74 68 65 20 |u are using the | 000016f0 6e 65 74 77 6f 72 6b 20 66 61 63 69 6c 69 74 79 |network facility| 00001700 20 74 68 65 6e 22 0d 0a 1e 2f f1 20 22 26 39 30 | then".../. "&90| 00001710 30 20 69 73 20 70 72 6f 62 61 62 6c 79 20 74 68 |0 is probably th| 00001720 65 20 62 65 73 74 20 70 6c 61 63 65 20 74 6f 20 |e best place to | 00001730 70 75 74 20 22 0d 0a 28 2f f1 20 22 74 68 65 20 |put "..(/. "the | 00001740 72 6f 75 74 69 6e 65 2e 20 54 68 69 73 20 69 73 |routine. This is| 00001750 20 74 68 65 20 63 61 73 73 65 74 74 65 2f 52 53 | the cassette/RS| 00001760 34 32 33 22 0d 0a 32 2f f1 20 22 69 6e 70 75 74 |423"..2/. "input| 00001770 2f 6f 75 74 70 75 74 20 61 72 65 61 2e 20 49 74 |/output area. It| 00001780 27 73 20 61 6c 73 6f 20 75 73 65 64 20 62 79 20 |'s also used by | 00001790 20 20 22 0d 0a 3c 2f f1 20 22 73 6f 75 6e 64 20 | "..</. "sound | 000017a0 65 6e 76 65 6c 6f 70 65 73 20 35 2d 31 36 20 61 |envelopes 5-16 a| 000017b0 6e 64 20 61 6e 79 20 73 70 65 65 63 68 20 20 20 |nd any speech | 000017c0 20 22 0d 0a 46 2f f1 20 22 75 70 67 72 61 64 65 | "..F/. "upgrade| 000017d0 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 70 72 | which may be pr| 000017e0 65 73 65 6e 74 2e 20 49 66 20 74 68 65 73 65 20 |esent. If these | 000017f0 22 0d 0a 50 2f f1 20 22 74 77 6f 20 61 6c 74 65 |"..P/. "two alte| 00001800 72 6e 61 74 69 76 65 73 20 64 6f 6e 27 74 20 73 |rnatives don't s| 00001810 75 69 74 20 79 6f 75 20 6d 61 79 20 20 20 20 22 |uit you may "| 00001820 0d 0a 5a 2f f1 20 22 61 73 73 65 6d 62 6c 65 20 |..Z/. "assemble | 00001830 74 68 65 20 72 6f 75 74 69 6e 65 20 74 6f 20 72 |the routine to r| 00001840 75 6e 20 61 6e 79 77 68 65 72 65 20 20 20 22 0d |un anywhere ".| 00001850 0a 64 2f f1 20 22 62 75 74 20 64 6f 6e 27 74 20 |.d/. "but don't | 00001860 65 78 70 65 63 74 20 73 65 6e 73 69 62 6c 65 20 |expect sensible | 00001870 72 65 73 75 6c 74 73 20 69 66 20 20 20 22 0d 0a |results if "..| 00001880 6e 2f f1 20 22 79 6f 75 20 70 75 74 20 69 74 20 |n/. "you put it | 00001890 73 6f 6d 65 77 68 65 72 65 20 64 61 66 74 2e 20 |somewhere daft. | 000018a0 20 20 20 20 20 20 20 20 20 20 20 20 22 0d 0a 78 | "..x| 000018b0 0a f2 73 70 61 63 65 0d 0a 82 2f f1 20 22 44 69 |..space.../. "Di| 000018c0 73 63 20 75 73 65 72 73 20 73 68 6f 75 6c 64 20 |sc users should | 000018d0 6b 65 65 70 20 74 68 65 20 70 72 6f 67 72 61 6d |keep the program| 000018e0 20 69 6e 20 20 22 0d 0a 8c 2f f1 20 22 74 68 65 | in ".../. "the| 000018f0 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f | current directo| 00001900 72 79 20 6f 72 20 6c 69 62 72 61 72 79 20 61 6e |ry or library an| 00001910 64 20 20 20 22 0d 0a 96 2f f1 20 22 63 61 6c 6c |d ".../. "call| 00001920 20 69 74 20 77 69 74 68 20 2a 3c 66 69 6c 65 6e | it with *<filen| 00001930 61 6d 65 3e 2e 20 54 61 70 65 20 75 73 65 72 73 |ame>. Tape users| 00001940 20 20 20 22 0d 0a a0 21 f1 20 22 73 68 6f 75 6c | "...!. "shoul| 00001950 64 20 75 73 65 20 2a 52 55 4e 20 53 45 54 43 4c |d use *RUN SETCL| 00001960 4f 43 4b 2e 22 0d 0a aa 2f f1 20 27 22 20 20 20 |OCK.".../. '" | 00001970 45 72 72 6f 72 20 6d 65 73 73 61 67 65 73 20 77 |Error messages w| 00001980 69 6c 6c 20 62 65 20 67 69 76 65 6e 20 69 66 20 |ill be given if | 00001990 74 68 65 22 0d 0a b4 2f f1 20 22 63 6c 6f 63 6b |the".../. "clock| 000019a0 20 63 61 6e 6e 6f 74 20 62 65 20 72 65 73 65 74 | cannot be reset| 000019b0 2e 20 54 68 65 20 72 6f 75 74 69 6e 65 20 63 61 |. The routine ca| 000019c0 6e 20 22 0d 0a be 2f f1 20 22 62 65 20 72 65 2d |n ".../. "be re-| 000019d0 72 75 6e 20 75 73 69 6e 67 20 43 41 4c 4c 20 26 |run using CALL &| 000019e0 3c 61 64 64 72 65 73 73 3e 20 69 66 20 79 6f 75 |<address> if you| 000019f0 20 22 0d 0a c8 2f f1 20 22 77 69 73 68 2e 20 54 | ".../. "wish. T| 00001a00 68 69 73 20 6d 61 79 20 62 65 20 75 73 65 66 75 |his may be usefu| 00001a10 6c 20 69 66 20 79 6f 75 20 61 72 65 20 20 20 20 |l if you are | 00001a20 22 0d 0a d2 13 f1 20 22 75 73 69 6e 67 20 74 61 |"..... "using ta| 00001a30 70 65 2e 22 0d 0a dc 2f f1 20 27 22 20 20 20 49 |pe.".../. '" I| 00001a40 66 20 74 68 65 20 63 6c 6f 63 6b 20 68 61 73 20 |f the clock has | 00001a50 62 65 65 6e 20 63 6f 72 72 65 63 74 6c 79 20 20 |been correctly | 00001a60 20 20 22 0d 0a e6 2f f1 20 22 72 65 73 65 74 20 | ".../. "reset | 00001a70 61 20 2a 54 49 4d 45 20 63 6f 6d 6d 61 6e 64 20 |a *TIME command | 00001a80 69 73 20 69 73 73 75 65 64 20 20 20 20 20 20 20 |is issued | 00001a90 20 22 0d 0a f0 2f f1 20 22 72 65 73 75 6c 74 69 | ".../. "resulti| 00001aa0 6e 67 20 69 6e 20 74 68 65 20 63 6f 6e 74 65 6e |ng in the conten| 00001ab0 74 73 20 6f 66 20 74 68 65 20 43 4d 4f 53 20 20 |ts of the CMOS | 00001ac0 22 0d 0a fa 2f f1 20 22 63 6c 6f 63 6b 20 62 65 |".../. "clock be| 00001ad0 69 6e 67 20 70 72 69 6e 74 65 64 20 6f 75 74 20 |ing printed out | 00001ae0 61 73 20 75 73 75 61 6c 2e 20 20 20 20 20 20 22 |as usual. "| 00001af0 0d 0b 04 0a f2 73 70 61 63 65 0d 0b 0e 2b f1 20 |.....space...+. | 00001b00 22 54 68 65 20 6e 65 78 74 20 70 61 72 74 20 6f |"The next part o| 00001b10 66 20 74 68 69 73 20 70 72 6f 67 72 61 6d 20 69 |f this program i| 00001b20 73 20 61 20 22 0d 0b 18 2f f1 20 22 64 65 6d 6f |s a ".../. "demo| 00001b30 6e 73 74 72 61 74 69 6f 6e 20 6f 66 20 53 45 54 |nstration of SET| 00001b40 43 4c 4f 43 4b 2e 20 54 68 65 20 43 4d 4f 53 20 |CLOCK. The CMOS | 00001b50 20 20 20 22 0d 0b 22 2f f1 20 22 63 6c 6f 63 6b | ".."/. "clock| 00001b60 20 63 61 6e 20 62 65 20 73 63 72 61 6d 62 6c 65 | can be scramble| 00001b70 64 20 61 6e 64 20 74 68 65 6e 20 72 65 73 65 74 |d and then reset| 00001b80 20 20 22 0d 0b 2c 2f f1 20 22 66 72 6f 6d 20 43 | "..,/. "from C| 00001b90 45 45 46 41 58 2e 20 28 46 6f 6c 6c 6f 77 20 6f |EEFAX. (Follow o| 00001ba0 6e 2d 73 63 72 65 65 6e 20 20 20 20 20 20 20 20 |n-screen | 00001bb0 20 22 0d 0b 36 16 f1 20 22 69 6e 73 74 72 75 63 | "..6.. "instruc| 00001bc0 74 69 6f 6e 73 2e 29 22 0d 0b 40 2f f1 20 27 22 |tions.)"..@/. '"| 00001bd0 20 20 54 68 65 20 43 45 45 46 41 58 20 68 65 61 | The CEEFAX hea| 00001be0 64 65 72 20 69 73 20 64 69 73 70 6c 61 79 65 64 |der is displayed| 00001bf0 20 66 6f 72 20 20 22 0d 0b 4a 2f f1 20 22 72 65 | for "..J/. "re| 00001c00 66 65 72 65 6e 63 65 20 74 68 72 6f 75 67 68 6f |ference througho| 00001c10 75 74 20 74 68 65 20 64 65 6d 6f 6e 73 74 72 61 |ut the demonstra| 00001c20 74 69 6f 6e 2e 22 0d 0b 54 2f f1 20 22 44 6f 20 |tion."..T/. "Do | 00001c30 6e 6f 74 20 62 65 20 70 75 74 20 6f 66 66 20 62 |not be put off b| 00001c40 79 20 74 68 65 20 77 61 79 20 74 68 65 20 43 4d |y the way the CM| 00001c50 4f 53 20 20 22 0d 0b 5e 2f f1 20 22 63 6c 6f 63 |OS "..^/. "cloc| 00001c60 6b 20 61 70 70 65 61 72 73 20 74 6f 20 6c 65 61 |k appears to lea| 00001c70 64 20 43 45 45 46 41 58 2e 20 53 45 54 43 4c 4f |d CEEFAX. SETCLO| 00001c80 43 4b 20 22 0d 0b 68 2f f1 20 22 75 73 65 73 20 |CK "..h/. "uses | 00001c90 74 68 65 20 54 65 6c 65 76 69 73 69 6f 6e 20 53 |the Television S| 00001ca0 65 72 76 69 63 65 20 44 61 74 61 20 50 61 63 6b |ervice Data Pack| 00001cb0 65 74 22 0d 0b 72 2f f1 20 22 74 6f 20 73 65 74 |et"..r/. "to set| 00001cc0 20 74 68 65 20 63 6c 6f 63 6b 20 61 6e 64 20 69 | the clock and i| 00001cd0 73 20 6d 6f 72 65 20 61 63 63 75 72 61 74 65 20 |s more accurate | 00001ce0 20 22 0d 0b 7c 2f f1 20 22 74 68 61 6e 20 74 68 | "..|/. "than th| 00001cf0 65 20 68 65 61 64 65 72 2e 20 20 20 20 20 20 20 |e header. | 00001d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001d10 22 0d 0b 86 0a f2 73 70 61 63 65 0d 0b 90 2f f1 |".....space.../.| 00001d20 20 27 22 20 20 54 6f 20 6c 65 61 76 65 20 74 68 | '" To leave th| 00001d30 65 20 64 65 6d 6f 6e 73 74 72 61 74 69 6f 6e 20 |e demonstration | 00001d40 70 72 65 73 73 20 66 32 2e 22 0d 0b 9a 2f f1 20 |press f2.".../. | 00001d50 22 54 68 65 6e 20 66 6f 6c 6c 6f 77 20 74 68 65 |"Then follow the| 00001d60 20 64 69 72 65 63 74 69 6f 6e 73 20 74 6f 20 67 | directions to g| 00001d70 65 6e 65 72 61 74 65 20 22 0d 0b a4 2f f1 20 22 |enerate ".../. "| 00001d80 53 45 54 43 4c 4f 43 4b 20 69 74 73 65 6c 66 20 |SETCLOCK itself | 00001d90 61 6e 64 20 73 61 76 65 20 69 74 20 74 6f 20 79 |and save it to y| 00001da0 6f 75 72 20 20 20 20 22 0d 0b ae 2f f1 20 22 63 |our ".../. "c| 00001db0 75 72 72 65 6e 74 20 66 69 6c 69 6e 67 20 73 79 |urrent filing sy| 00001dc0 73 74 65 6d 2e 20 49 66 20 79 6f 75 20 61 72 65 |stem. If you are| 00001dd0 20 75 73 69 6e 67 22 0d 0b b8 2f f1 20 22 74 68 | using".../. "th| 00001de0 65 20 52 4f 4d 20 66 69 6c 69 6e 67 20 73 79 73 |e ROM filing sys| 00001df0 74 65 6d 20 6f 72 20 54 46 53 20 74 68 65 20 20 |tem or TFS the | 00001e00 20 20 20 20 20 22 0d 0b c2 2f f1 20 22 70 72 6f | ".../. "pro| 00001e10 67 72 61 6d 20 77 69 6c 6c 20 6e 6f 74 20 62 65 |gram will not be| 00001e20 20 73 61 76 65 64 2e 20 20 20 20 20 20 20 20 20 | saved. | 00001e30 20 20 20 20 22 0d 0b cc 2f f1 20 27 22 20 20 54 | ".../. '" T| 00001e40 68 65 20 70 72 6f 67 72 61 6d 20 63 6f 6e 74 61 |he program conta| 00001e50 69 6e 73 20 6d 61 6e 79 20 6e 6f 74 65 73 20 73 |ins many notes s| 00001e60 6f 20 20 22 0d 0b d6 2f f1 20 22 79 6f 75 20 73 |o ".../. "you s| 00001e70 68 6f 75 6c 64 20 62 65 20 61 62 6c 65 20 74 6f |hould be able to| 00001e80 20 61 64 61 70 74 20 69 74 2e 20 41 6e 79 20 20 | adapt it. Any | 00001e90 20 20 22 0d 0b e0 2f f1 20 22 63 6f 6d 6d 65 6e | ".../. "commen| 00001ea0 74 73 20 77 6f 75 6c 64 20 62 65 20 77 65 6c 63 |ts would be welc| 00001eb0 6f 6d 65 20 76 69 61 20 50 52 45 53 54 45 4c 20 |ome via PRESTEL | 00001ec0 20 22 0d 0b ea 1a f1 20 22 6d 61 69 6c 62 6f 78 | "..... "mailbox| 00001ed0 20 30 31 32 33 37 33 37 39 37 2e 22 0d 0b f4 0a | 012373797."....| 00001ee0 f2 73 70 61 63 65 0d 0b fe 05 e1 0d 0c 08 05 3a |.space.........:| 00001ef0 0d 0c 12 0c dd 20 f2 73 70 61 63 65 0d 0c 1c 05 |..... .space....| 00001f00 3a 0d 0c 26 2d f1 20 8a 35 2c 31 39 29 bd 31 33 |:..&-. .5,19).13| 00001f10 31 22 50 72 65 73 73 20 53 50 41 43 45 20 42 41 |1"Press SPACE BA| 00001f20 52 20 74 6f 20 63 6f 6e 74 69 6e 75 65 22 0d 0c |R to continue"..| 00001f30 30 0e f5 20 fd 20 a6 28 2d 39 39 29 0d 0c 3a 09 |0.. . .(-99)..:.| 00001f40 2a 46 58 31 35 0d 0c 44 05 db 0d 0c 4e 05 e1 0d |*FX15..D....N...| 00001f50 0c 58 05 3a 0d 0c 62 0b dd 20 f2 64 65 6d 6f 0d |.X.:..b.. .demo.| 00001f60 0c 6c 05 3a 0d 0c 76 10 ee 20 85 20 f2 65 72 72 |.l.:..v.. . .err| 00001f70 6f 72 3a e0 0d 0c 80 07 ef 32 36 0d 0c 8a 05 db |or:......26.....| 00001f80 0d 0c 94 1d f1 20 8a 30 2c 30 29 bd 31 33 34 22 |..... .0,0).134"| 00001f90 53 43 4c 4f 43 4b 22 3b bd 31 33 35 3b 0d 0c 9e |SCLOCK";.135;...| 00001fa0 0a 2a 54 54 58 4f 4e 0d 0c a8 08 2a 48 4f 4e 0d |.*TTXON....*HON.| 00001fb0 0c b2 0e 2a 46 58 32 32 35 2c 32 34 30 0d 0c bc |...*FX225,240...| 00001fc0 0a f2 63 5f 6f 66 66 0d 0c c6 2b f1 20 8a 36 2c |..c_off...+. .6,| 00001fd0 32 29 bd 31 34 31 bd 31 33 31 22 53 65 74 63 6c |2).141.131"Setcl| 00001fe0 6f 63 6b 20 64 65 6d 6f 6e 73 74 72 61 74 69 6f |ock demonstratio| 00001ff0 6e 22 0d 0c d0 29 f1 20 8a 36 29 bd 31 34 31 bd |n"...). .6).141.| 00002000 31 33 31 22 53 65 74 63 6c 6f 63 6b 20 64 65 6d |131"Setclock dem| 00002010 6f 6e 73 74 72 61 74 69 6f 6e 22 0d 0c da 26 f1 |onstration"...&.| 00002020 20 8a 39 2c 37 29 bd 31 34 31 bd 31 33 33 22 43 | .9,7).141.133"C| 00002030 4d 4f 53 20 43 6c 6f 63 6b 20 72 65 61 64 73 3a |MOS Clock reads:| 00002040 22 0d 0c e4 24 f1 20 8a 39 29 bd 31 34 31 bd 31 |"...$. .9).141.1| 00002050 33 33 22 43 4d 4f 53 20 43 6c 6f 63 6b 20 72 65 |33"CMOS Clock re| 00002060 61 64 73 3a 22 0d 0c ee 17 72 65 64 24 3d bd 31 |ads:"....red$=.1| 00002070 32 39 2b bd 31 35 37 2b bd 31 33 35 0d 0c f8 0f |29+.157+.135....| 00002080 62 6c 61 63 6b 24 3d bd 31 35 36 0d 0d 02 28 f1 |black$=.156...(.| 00002090 20 8a 31 2c 32 30 29 72 65 64 24 3b 22 66 30 20 | .1,20)red$;"f0 | 000020a0 20 22 3b 62 6c 61 63 6b 24 3b 22 20 20 20 20 20 | ";black$;" | 000020b0 20 22 3b 0d 0d 0c 22 f1 20 72 65 64 24 3b 22 66 | ";...". red$;"f| 000020c0 31 20 20 22 3b 62 6c 61 63 6b 24 3b 22 20 20 20 |1 ";black$;" | 000020d0 20 20 20 22 3b 0d 0d 16 18 f1 20 72 65 64 24 3b | ";..... red$;| 000020e0 22 66 32 20 20 22 3b 62 6c 61 63 6b 24 0d 0d 20 |"f2 ";black$.. | 000020f0 30 f1 20 27 8a 32 29 22 52 65 73 65 74 22 3b 8a |0. '.2)"Reset";.| 00002100 31 35 29 22 53 63 72 61 6d 62 6c 65 22 3b 8a 32 |15)"Scramble";.2| 00002110 39 29 22 45 78 69 74 20 64 65 6d 6f 22 0d 0d 2a |9)"Exit demo"..*| 00002120 05 f5 0d 0d 34 09 2a 46 58 31 35 0d 0d 3e 10 f2 |....4.*FX15..>..| 00002130 75 70 64 61 74 65 5f 74 69 6d 65 0d 0d 48 17 e7 |update_time..H..| 00002140 20 41 3d 32 34 30 20 8c 20 f2 73 65 74 63 6c 6f | A=240 . .setclo| 00002150 63 6b 0d 0d 52 14 e7 20 41 3d 32 34 31 20 8c 20 |ck..R.. A=241 . | 00002160 f2 75 6e 73 65 74 0d 0d 5c 0b fd 20 41 3d 32 34 |.unset..\.. A=24| 00002170 32 0d 0d 66 09 2a 48 4f 46 46 0d 0d 70 0b 2a 54 |2..f.*HOFF..p.*T| 00002180 54 58 4f 46 46 0d 0d 7a 0c 2a 46 58 32 32 35 2c |TXOFF..z.*FX225,| 00002190 31 0d 0d 84 07 ef 32 36 0d 0d 8e 09 ee 20 85 20 |1.....26..... . | 000021a0 87 0d 0d 98 05 e1 0d 0d a2 05 3a 0d 0d ac 0c dd |..........:.....| 000021b0 20 f2 75 6e 73 65 74 0d 0d b6 05 3a 0d 0d c0 21 | .unset....:...!| 000021c0 d1 24 3d 22 53 61 74 2c 31 34 20 4d 61 72 20 31 |.$="Sat,14 Mar 1| 000021d0 39 38 32 2e 31 30 3a 31 30 3a 31 30 22 0d 0d ca |982.10:10:10"...| 000021e0 05 e1 0d 0d d4 05 3a 0d 0d de 0c dd 20 f2 63 5f |......:..... .c_| 000021f0 6f 66 66 0d 0d e8 05 3a 0d 0d f2 14 ef 32 33 2c |off....:.....23,| 00002200 31 2c 30 3b 30 3b 30 3b 30 3b 30 3b 0d 0d fc 05 |1,0;0;0;0;0;....| 00002210 e1 0d 0e 06 05 3a 0d 0e 10 0b dd 20 f2 63 5f 6f |.....:..... .c_o| 00002220 6e 0d 0e 1a 05 3a 0d 0e 24 14 ef 32 33 2c 31 2c |n....:..$..23,1,| 00002230 31 3b 30 3b 30 3b 30 3b 30 3b 0d 0e 2e 05 e1 0d |1;0;0;0;0;......| 00002240 0e 38 05 3a 0d 0e 42 12 dd 20 f2 75 70 64 61 74 |.8.:..B.. .updat| 00002250 65 5f 74 69 6d 65 0d 0e 4c 05 3a 0d 0e 56 05 f5 |e_time..L.:..V..| 00002260 0d 0e 60 16 f1 20 8a 35 2c 39 29 bd 31 34 31 bd |..`.. .5,9).141.| 00002270 31 33 34 3b 91 24 0d 0e 6a 14 f1 20 8a 35 29 bd |134;.$..j.. .5).| 00002280 31 34 31 bd 31 33 34 3b 91 24 0d 0e 74 0d fd 20 |141.134;.$..t.. | 00002290 96 28 2d 31 29 3e 30 0d 0e 7e 07 41 3d a5 0d 0e |.(-1)>0..~.A=...| 000022a0 88 05 e1 0d 0e 92 05 3a 0d 0e 9c 0f dd 20 f2 73 |.......:..... .s| 000022b0 65 74 63 6c 6f 63 6b 0d 0e a6 05 3a 0d 0e b0 2d |etclock....:...-| 000022c0 f1 20 8a 37 2c 35 29 72 65 64 24 3b 22 53 45 54 |. .7,5)red$;"SET| 000022d0 54 49 4e 47 20 43 4d 4f 53 20 43 4c 4f 43 4b 20 |TING CMOS CLOCK | 000022e0 20 22 3b 62 6c 61 63 6b 24 0d 0e ba 2f f1 20 8a | ";black$.../. .| 000022f0 35 2c 31 33 29 bd 31 34 31 bd 31 33 30 22 43 4d |5,13).141.130"CM| 00002300 4f 53 20 43 6c 6f 63 6b 20 6c 61 73 74 20 72 65 |OS Clock last re| 00002310 73 65 74 20 61 74 3a 22 0d 0e c4 2d f1 20 8a 35 |set at:"...-. .5| 00002320 29 bd 31 34 31 bd 31 33 30 22 43 4d 4f 53 20 43 |).141.130"CMOS C| 00002330 6c 6f 63 6b 20 6c 61 73 74 20 72 65 73 65 74 20 |lock last reset | 00002340 61 74 3a 22 27 0d 0e ce 13 f1 20 bd 31 33 31 22 |at:"'..... .131"| 00002350 20 20 20 20 20 20 22 3b 0d 0e d8 0b d6 20 26 37 | ";..... &7| 00002360 30 30 30 0d 0e e2 0a 2a 54 54 58 4f 4e 0d 0e ec |000....*TTXON...| 00002370 12 f1 20 8a 36 2c 35 29 3b 89 28 33 30 29 3b 0d |.. .6,5);.(30);.| 00002380 0e f6 05 e1 0d 0f 00 05 3a 0d 0f 0a 0c dd 20 f2 |........:..... .| 00002390 65 72 72 6f 72 0d 0f 14 05 3a 0d 0f 1e 0b 2a 54 |error....:....*T| 000023a0 54 58 4f 46 46 0d 0f 28 0e e7 20 9f 3d 31 37 20 |TXOFF..(.. .=17 | 000023b0 f6 3a e0 0d 0f 32 2f e7 20 9f 3d 26 46 46 20 65 |.:...2/. .=&FF e| 000023c0 72 72 6f 72 24 3d 22 53 6f 72 72 79 2c 20 6e 6f |rror$="Sorry, no| 000023d0 20 54 65 6c 65 74 65 78 74 20 61 64 61 70 74 6f | Teletext adapto| 000023e0 72 22 0d 0f 3c 2f e7 20 9f 3d 35 30 20 65 72 72 |r"..</. .=50 err| 000023f0 6f 72 24 3d 22 53 6f 72 72 79 2c 20 61 64 61 70 |or$="Sorry, adap| 00002400 74 6f 72 20 73 77 69 74 63 68 65 64 20 6f 66 66 |tor switched off| 00002410 22 0d 0f 46 2f e7 20 9f 3d 35 31 20 65 72 72 6f |"..F/. .=51 erro| 00002420 72 24 3d 22 53 6f 72 72 79 2c 20 6e 6f 74 20 72 |r$="Sorry, not r| 00002430 65 63 65 69 76 69 6e 67 20 43 45 45 46 41 58 22 |eceiving CEEFAX"| 00002440 0d 0f 50 2f e7 20 9f 3d 35 32 20 65 72 72 6f 72 |..P/. .=52 error| 00002450 24 3d 22 53 6f 72 72 79 2c 20 63 61 6e 27 74 20 |$="Sorry, can't | 00002460 66 69 6e 64 20 64 61 74 65 2f 74 69 6d 65 22 0d |find date/time".| 00002470 0f 5a 16 65 72 72 6f 72 24 3d 65 72 72 6f 72 24 |.Z.error$=error$| 00002480 2b 22 20 20 22 0d 0f 64 2d f1 20 8a 31 38 2d 28 |+" "..d-. .18-(| 00002490 a9 28 65 72 72 6f 72 24 29 2f 32 29 2c 31 36 29 |.(error$)/2),16)| 000024a0 72 65 64 24 3b 65 72 72 6f 72 24 3b 62 6c 61 63 |red$;error$;blac| 000024b0 6b 24 0d 0f 6e 12 ef 32 38 2c 30 2c 32 32 2c 33 |k$..n..28,0,22,3| 000024c0 39 2c 31 39 0d 0f 78 05 db 0d 0f 82 07 ef 32 36 |9,19..x.......26| 000024d0 0d 0f 8c 0a f2 73 70 61 63 65 0d 0f 96 11 f2 63 |.....space.....c| 000024e0 6f 6c 6c 65 63 74 5f 64 61 74 61 0d 0f a0 09 f2 |ollect_data.....| 000024f0 73 61 76 65 0d 0f aa 08 f2 65 6e 64 0d 0f b4 05 |save.....end....| 00002500 e1 0d 0f be 05 3a 0d 0f c8 13 dd 20 f2 63 6f 6c |.....:..... .col| 00002510 6c 65 63 74 5f 64 61 74 61 0d 0f d2 05 3a 0d 0f |lect_data....:..| 00002520 dc 05 db 0d 0f e6 21 f1 20 bd 31 34 31 bd 31 33 |......!. .141.13| 00002530 34 8a 31 32 29 22 53 61 76 65 20 53 45 54 43 4c |4.12)"Save SETCL| 00002540 4f 43 4b 22 0d 0f f0 21 f1 20 bd 31 34 31 bd 31 |OCK"...!. .141.1| 00002550 33 34 8a 31 32 29 22 53 61 76 65 20 53 45 54 43 |34.12)"Save SETC| 00002560 4c 4f 43 4b 22 0d 0f fa 11 ef 32 38 2c 30 2c 32 |LOCK".....28,0,2| 00002570 32 2c 33 39 2c 33 0d 10 04 13 66 69 6c 65 25 3d |2,39,3....file%=| 00002580 a4 66 69 6c 65 5f 73 79 73 0d 10 0e 17 e7 20 66 |.file_sys..... f| 00002590 69 6c 65 25 3d 30 20 f2 6e 6f 66 69 6c 65 3a e1 |ile%=0 .nofile:.| 000025a0 0d 10 18 1f e7 20 66 69 6c 65 25 3d 31 20 84 20 |..... file%=1 . | 000025b0 66 69 6c 65 25 3d 32 20 f2 74 61 70 65 3a e1 0d |file%=2 .tape:..| 000025c0 10 22 21 e7 20 66 69 6c 65 25 3d 33 20 84 20 66 |."!. file%=3 . f| 000025d0 69 6c 65 25 3d 36 20 f2 6e 6f 73 61 76 65 3a e1 |ile%=6 .nosave:.| 000025e0 0d 10 2c 14 e7 20 66 69 6c 65 25 3d 34 20 f2 64 |..,.. file%=4 .d| 000025f0 66 73 3a e1 0d 10 36 23 e7 20 66 69 6c 65 25 3d |fs:...6#. file%=| 00002600 35 20 84 20 66 69 6c 65 25 3d 38 20 f2 6e 65 74 |5 . file%=8 .net| 00002610 5f 61 64 66 73 3a e1 0d 10 40 14 e7 20 66 69 6c |_adfs:...@.. fil| 00002620 65 25 3d 36 20 f2 74 66 73 3a e1 0d 10 4a 05 e1 |e%=6 .tfs:...J..| 00002630 0d 10 54 05 3a 0d 10 5e 0d dd 20 f2 6e 6f 66 69 |..T.:..^.. .nofi| 00002640 6c 65 0d 10 68 05 3a 0d 10 72 32 f1 20 22 54 68 |le..h.:..r2. "Th| 00002650 65 72 65 20 69 73 20 6e 6f 20 66 69 6c 69 6e 67 |ere is no filing| 00002660 20 73 79 73 74 65 6d 20 73 65 6c 65 63 74 65 64 | system selected| 00002670 2e 20 50 6c 65 61 73 65 22 0d 10 7c 2a f1 20 22 |. Please"..|*. "| 00002680 73 65 6c 65 63 74 20 6f 6e 65 20 61 6e 64 20 72 |select one and r| 00002690 65 2d 72 75 6e 20 74 68 65 20 70 72 6f 67 72 61 |e-run the progra| 000026a0 6d 2e 22 0d 10 86 08 f2 65 6e 64 0d 10 90 05 e1 |m.".....end.....| 000026b0 0d 10 9a 05 3a 0d 10 a4 0b dd 20 f2 74 61 70 65 |....:..... .tape| 000026c0 0d 10 ae 05 3a 0d 10 b8 3c e7 20 66 69 6c 65 25 |....:...<. file%| 000026d0 3d 31 20 66 73 24 3d 22 54 41 50 45 20 28 31 32 |=1 fs$="TAPE (12| 000026e0 30 30 20 42 61 75 64 29 22 20 8b 20 66 73 24 3d |00 Baud)" . fs$=| 000026f0 22 54 41 50 45 20 28 33 30 30 20 42 61 75 64 29 |"TAPE (300 Baud)| 00002700 22 0d 10 c2 18 66 69 6c 65 6e 61 6d 65 24 3d 22 |"....filename$="| 00002710 53 45 54 43 4c 4f 43 4b 22 0d 10 cc 0d f2 70 72 |SETCLOCK".....pr| 00002720 69 6e 74 5f 66 73 0d 10 d6 10 f2 67 65 74 5f 61 |int_fs.....get_a| 00002730 64 64 72 65 73 73 0d 10 e0 05 db 0d 10 ea 14 f1 |ddress..........| 00002740 8a 30 2c 35 29 3b bd 31 33 36 bd 31 32 39 3b 0d |.0,5);.136.129;.| 00002750 10 f4 13 ef 32 38 2c 31 30 2c 32 32 2c 32 37 2c |....28,10,22,27,| 00002760 31 33 0d 10 fe 05 e1 0d 11 08 05 3a 0d 11 12 0d |13.........:....| 00002770 dd 20 f2 6e 6f 73 61 76 65 0d 11 1c 2c e7 20 66 |. .nosave...,. f| 00002780 69 6c 65 25 3d 33 20 66 73 24 3d 22 52 4f 4d 22 |ile%=3 fs$="ROM"| 00002790 20 8b 20 66 73 24 3d 22 54 65 6c 65 73 6f 66 74 | . fs$="Telesoft| 000027a0 77 61 72 65 22 0d 11 26 2a f1 20 22 53 6f 72 72 |ware"..&*. "Sorr| 000027b0 79 2c 20 79 6f 75 20 63 61 6e 6e 6f 74 20 73 61 |y, you cannot sa| 000027c0 76 65 20 74 6f 20 74 68 65 20 22 3b 66 73 24 0d |ve to the ";fs$.| 000027d0 11 30 2d f1 20 27 22 66 69 6c 69 6e 67 20 73 79 |.0-. '"filing sy| 000027e0 73 74 65 6d 2e 20 50 6c 65 61 73 65 20 73 65 6c |stem. Please sel| 000027f0 65 63 74 20 61 6e 6f 74 68 65 72 22 0d 11 3a 2b |ect another"..:+| 00002800 f1 20 27 22 28 65 2e 67 2e 20 64 69 73 63 20 6f |. '"(e.g. disc o| 00002810 72 20 74 61 70 65 29 20 61 6e 64 20 72 65 2d 72 |r tape) and re-r| 00002820 75 6e 20 74 68 65 22 0d 11 44 11 f1 20 27 22 70 |un the"..D.. '"p| 00002830 72 6f 67 72 61 6d 2e 22 0d 11 4e 09 f2 63 5f 6f |rogram."..N..c_o| 00002840 6e 0d 11 58 07 ef 32 36 0d 11 62 0d f1 20 8a 30 |n..X..26..b.. .0| 00002850 2c 31 35 29 3b 0d 11 6c 05 e0 0d 11 76 05 e1 0d |,15);..l....v...| 00002860 11 80 05 3a 0d 11 8a 0a dd 20 f2 64 66 73 0d 11 |...:..... .dfs..| 00002870 94 05 3a 0d 11 9e 14 66 73 24 3d 22 44 49 53 43 |..:....fs$="DISC| 00002880 20 28 44 46 53 29 22 0d 11 a8 16 66 69 6c 65 6e | (DFS)"....filen| 00002890 61 6d 65 24 3d 22 53 45 54 43 4c 4b 22 0d 11 b2 |ame$="SETCLK"...| 000028a0 0d f2 70 72 69 6e 74 5f 66 73 0d 11 bc 2f f1 20 |..print_fs.../. | 000028b0 bd 31 33 31 22 50 6c 65 61 73 65 20 65 6e 74 65 |.131"Please ente| 000028c0 72 20 61 6e 79 20 70 72 65 66 69 78 20 74 6f 20 |r any prefix to | 000028d0 66 69 6c 65 6e 61 6d 65 22 0d 11 c6 30 f1 20 bd |filename"...0. .| 000028e0 31 33 31 22 28 69 2e 65 2e 20 3a 31 2e 57 2e 20 |131"(i.e. :1.W. | 000028f0 74 6f 20 73 61 76 65 20 66 69 6c 65 20 74 6f 20 |to save file to | 00002900 64 72 69 76 65 20 31 2c 22 0d 11 d0 2b f1 20 bd |drive 1,"...+. .| 00002910 31 33 31 22 64 69 72 65 63 74 6f 72 79 20 57 2e |131"directory W.| 00002920 29 20 50 72 65 73 73 20 3c 52 45 54 55 52 4e 3e |) Press <RETURN>| 00002930 20 74 6f 22 0d 11 da 19 f1 20 bd 31 33 31 22 66 | to"..... .131"f| 00002940 69 6e 69 73 68 20 65 6e 74 72 79 2e 22 0d 11 e4 |inish entry."...| 00002950 09 f2 63 5f 6f 6e 0d 11 ee 25 f1 20 27 27 8a 31 |..c_on...%. ''.1| 00002960 32 29 bd 31 33 34 3b 3a e8 20 22 50 52 45 46 49 |2).134;:. "PREFI| 00002970 58 3a 20 22 70 72 65 66 69 78 24 0d 11 f8 0a f2 |X: "prefix$.....| 00002980 63 5f 6f 66 66 0d 12 02 3a e7 20 a9 28 70 72 65 |c_off...:. .(pre| 00002990 66 69 78 24 29 3c 3e 30 20 e7 20 c2 70 72 65 66 |fix$)<>0 . .pref| 000029a0 69 78 24 2c 31 29 3c 3e 22 2e 22 20 70 72 65 66 |ix$,1)<>"." pref| 000029b0 69 78 24 3d 70 72 65 66 69 78 24 2b 22 2e 22 0d |ix$=prefix$+".".| 000029c0 12 0c 1f 66 69 6c 65 6e 61 6d 65 24 3d 70 72 65 |...filename$=pre| 000029d0 66 69 78 24 2b 66 69 6c 65 6e 61 6d 65 24 0d 12 |fix$+filename$..| 000029e0 16 10 f2 67 65 74 5f 61 64 64 72 65 73 73 0d 12 |...get_address..| 000029f0 20 05 e1 0d 12 2a 05 3a 0d 12 34 0f dd 20 f2 6e | ....*.:..4.. .n| 00002a00 65 74 5f 61 64 66 73 0d 12 3e 05 3a 0d 12 48 2f |et_adfs..>.:..H/| 00002a10 e7 20 66 69 6c 65 25 3d 35 20 66 73 24 3d 22 4e |. file%=5 fs$="N| 00002a20 45 54 57 4f 52 4b 22 20 8b 20 66 73 24 3d 22 44 |ETWORK" . fs$="D| 00002a30 49 53 43 20 28 41 44 46 53 29 22 0d 12 52 18 66 |ISC (ADFS)"..R.f| 00002a40 69 6c 65 6e 61 6d 65 24 3d 22 53 45 54 43 4c 4f |ilename$="SETCLO| 00002a50 43 4b 22 0d 12 5c 0d f2 70 72 69 6e 74 5f 66 73 |CK"..\..print_fs| 00002a60 0d 12 66 2e f1 20 bd 31 33 31 22 50 6c 65 61 73 |..f.. .131"Pleas| 00002a70 65 20 65 6e 74 65 72 20 61 6e 79 20 70 61 74 68 |e enter any path| 00002a80 6e 61 6d 65 20 74 68 61 74 20 79 6f 75 22 0d 12 |name that you"..| 00002a90 70 2d f1 20 bd 31 33 31 22 72 65 71 75 69 72 65 |p-. .131"require| 00002aa0 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 62 65 | added to the be| 00002ab0 67 69 6e 6e 69 6e 67 20 6f 66 22 0d 12 7a 2b f1 |ginning of"..z+.| 00002ac0 20 bd 31 33 31 22 74 68 65 20 66 69 6c 65 6e 61 | .131"the filena| 00002ad0 6d 65 2e 20 50 72 65 73 73 20 3c 52 45 54 55 52 |me. Press <RETUR| 00002ae0 4e 3e 20 74 6f 22 0d 12 84 19 f1 20 bd 31 33 31 |N> to"..... .131| 00002af0 22 66 69 6e 69 73 68 20 65 6e 74 72 79 2e 22 0d |"finish entry.".| 00002b00 12 8e 09 f2 63 5f 6f 6e 0d 12 98 23 f1 20 27 27 |....c_on...#. ''| 00002b10 bd 31 33 34 3b 3a e8 20 22 50 41 54 48 4e 41 4d |.134;:. "PATHNAM| 00002b20 45 3a 20 22 70 72 65 66 69 78 24 0d 12 a2 0a f2 |E: "prefix$.....| 00002b30 63 5f 6f 66 66 0d 12 ac 3a e7 20 a9 28 70 72 65 |c_off...:. .(pre| 00002b40 66 69 78 24 29 3c 3e 30 20 e7 20 c2 70 72 65 66 |fix$)<>0 . .pref| 00002b50 69 78 24 2c 31 29 3c 3e 22 2e 22 20 70 72 65 66 |ix$,1)<>"." pref| 00002b60 69 78 24 3d 70 72 65 66 69 78 24 2b 22 2e 22 0d |ix$=prefix$+".".| 00002b70 12 b6 1f 66 69 6c 65 6e 61 6d 65 24 3d 70 72 65 |...filename$=pre| 00002b80 66 69 78 24 2b 66 69 6c 65 6e 61 6d 65 24 0d 12 |fix$+filename$..| 00002b90 c0 10 f2 67 65 74 5f 61 64 64 72 65 73 73 0d 12 |...get_address..| 00002ba0 ca 05 e1 0d 12 d4 05 3a 0d 12 de 0f dd 20 f2 70 |.......:..... .p| 00002bb0 72 69 6e 74 5f 66 73 0d 12 e8 05 3a 0d 12 f2 2a |rint_fs....:...*| 00002bc0 f1 20 bd 31 33 31 22 43 75 72 72 65 6e 74 20 66 |. .131"Current f| 00002bd0 69 6c 69 6e 67 20 73 79 73 74 65 6d 3a 22 bd 31 |iling system:".1| 00002be0 33 35 3b 66 73 24 0d 12 fc 37 f1 20 27 bd 31 33 |35;fs$...7. '.13| 00002bf0 31 22 54 68 65 20 70 72 6f 67 72 61 6d 20 77 69 |1"The program wi| 00002c00 6c 6c 20 62 65 20 73 61 76 65 64 20 61 73 22 bd |ll be saved as".| 00002c10 31 33 35 3b 66 69 6c 65 6e 61 6d 65 24 0d 13 06 |135;filename$...| 00002c20 11 ef 32 38 2c 30 2c 32 32 2c 33 39 2c 38 0d 13 |..28,0,22,39,8..| 00002c30 10 05 e1 0d 13 1a 05 3a 0d 13 24 12 dd 20 f2 67 |.......:..$.. .g| 00002c40 65 74 5f 61 64 64 72 65 73 73 0d 13 2e 05 3a 0d |et_address....:.| 00002c50 13 38 33 f1 20 27 27 bd 31 33 30 22 20 20 57 68 |.83. ''.130" Wh| 00002c60 65 72 65 20 77 6f 75 6c 64 20 79 6f 75 20 6c 69 |ere would you li| 00002c70 6b 65 20 74 68 65 20 72 6f 75 74 69 6e 65 3f 22 |ke the routine?"| 00002c80 27 27 0d 13 42 3d e7 20 66 69 6c 65 25 3e 32 20 |''..B=. file%>2 | 00002c90 f1 20 bd 31 33 31 22 31 2e 20 53 65 72 69 61 6c |. .131"1. Serial| 00002ca0 2f 63 61 73 73 65 74 74 65 20 70 6f 72 74 20 62 |/cassette port b| 00002cb0 75 66 66 65 72 73 20 28 26 39 30 30 29 22 27 0d |uffers (&900)"'.| 00002cc0 13 4c 28 f1 20 27 bd 31 33 31 22 32 2e 20 45 63 |.L(. '.131"2. Ec| 00002cd0 6f 6e 65 74 20 77 6f 72 6b 73 70 61 63 65 20 28 |onet workspace (| 00002ce0 26 42 30 30 29 22 27 0d 13 56 23 f1 20 27 bd 31 |&B00)"'..V#. '.1| 00002cf0 33 31 22 33 2e 20 41 74 20 61 6e 6f 74 68 65 72 |31"3. At another| 00002d00 20 61 64 64 72 65 73 73 22 27 0d 13 60 05 f5 0d | address"'..`...| 00002d10 13 6a 07 41 3d a5 0d 13 74 2f fd 20 28 66 69 6c |.j.A=...t/. (fil| 00002d20 65 25 3e 32 20 80 20 28 41 3e 34 38 20 80 20 41 |e%>2 . (A>48 . A| 00002d30 3c 35 32 29 29 20 84 20 28 41 3e 34 39 20 80 20 |<52)) . (A>49 . | 00002d40 41 3c 35 32 29 0d 13 7e 19 e7 20 41 3d 34 39 20 |A<52)..~.. A=49 | 00002d50 61 64 64 72 65 73 73 3d 26 39 30 30 3a e1 0d 13 |address=&900:...| 00002d60 88 19 e7 20 41 3d 35 30 20 61 64 64 72 65 73 73 |... A=50 address| 00002d70 3d 26 42 30 30 3a e1 0d 13 92 1a e7 20 41 3d 35 |=&B00:...... A=5| 00002d80 31 20 f2 75 73 65 72 5f 61 64 64 72 65 73 73 3a |1 .user_address:| 00002d90 e1 0d 13 9c 05 e1 0d 13 a6 05 3a 0d 13 b0 13 dd |..........:.....| 00002da0 20 f2 75 73 65 72 5f 61 64 64 72 65 73 73 0d 13 | .user_address..| 00002db0 ba 05 db 0d 13 c4 09 f2 63 5f 6f 6e 0d 13 ce 32 |........c_on...2| 00002dc0 f1 20 27 bd 31 33 31 22 50 6c 65 61 73 65 20 65 |. '.131"Please e| 00002dd0 6e 74 65 72 20 74 68 65 20 61 64 64 72 65 73 73 |nter the address| 00002de0 20 79 6f 75 20 72 65 71 75 69 72 65 3a 22 0d 13 | you require:"..| 00002df0 d8 14 f1 20 27 8a 31 34 29 bd 31 33 34 3b 22 26 |... '.14).134;"&| 00002e00 22 3b 0d 13 e2 16 61 64 64 72 65 73 73 3d a4 68 |";....address=.h| 00002e10 65 78 5f 69 6e 70 75 74 0d 13 ec 0a f2 63 5f 6f |ex_input.....c_o| 00002e20 66 66 0d 13 f6 05 e1 0d 14 00 05 3a 0d 14 0a 10 |ff.........:....| 00002e30 dd 20 a4 68 65 78 5f 69 6e 70 75 74 0d 14 14 05 |. .hex_input....| 00002e40 3a 0d 14 1e 19 3d ba 28 68 65 78 5f 69 6e 70 75 |:....=.(hex_inpu| 00002e50 74 29 20 80 20 26 46 46 46 46 0d 14 28 05 3a 0d |t) . &FFFF..(.:.| 00002e60 14 32 1a dd 20 a4 68 65 78 5f 73 74 72 69 6e 67 |.2.. .hex_string| 00002e70 28 69 6e 74 65 67 65 72 29 0d 14 3c 05 3a 0d 14 |(integer)..<.:..| 00002e80 46 14 41 25 3d 69 6e 74 65 67 65 72 20 83 20 32 |F.A%=integer . 2| 00002e90 35 36 0d 14 50 14 58 25 3d 69 6e 74 65 67 65 72 |56..P.X%=integer| 00002ea0 20 81 20 32 35 36 0d 14 5a 10 d6 20 68 65 78 5f | . 256..Z.. hex_| 00002eb0 73 74 72 69 6e 67 0d 14 64 0d 3d 24 68 65 78 61 |string..d.=$hexa| 00002ec0 64 64 72 0d 14 6e 05 3a 0d 14 78 0f dd 20 a4 66 |ddr..n.:..x.. .f| 00002ed0 69 6c 65 5f 73 79 73 0d 14 82 05 3a 0d 14 8c 08 |ile_sys....:....| 00002ee0 41 25 3d 30 0d 14 96 08 59 25 3d 30 0d 14 a0 13 |A%=0....Y%=0....| 00002ef0 3d ba 28 26 46 46 44 41 29 20 80 20 26 46 46 0d |=.(&FFDA) . &FF.| 00002f00 14 aa 05 3a 0d 14 b4 0b dd 20 f2 73 61 76 65 0d |...:..... .save.| 00002f10 14 be 05 3a 0d 14 c8 21 61 64 64 72 65 73 73 24 |...:...!address$| 00002f20 3d a4 68 65 78 5f 73 74 72 69 6e 67 28 61 64 64 |=.hex_string(add| 00002f30 72 65 73 73 29 0d 14 d2 45 ff 20 28 22 53 41 56 |ress)...E. ("SAV| 00002f40 45 20 22 2b 66 69 6c 65 6e 61 6d 65 24 2b 22 20 |E "+filename$+" | 00002f50 37 30 30 30 20 2b 32 30 30 20 46 46 46 46 22 2b |7000 +200 FFFF"+| 00002f60 61 64 64 72 65 73 73 24 2b 22 20 46 46 46 46 22 |address$+" FFFF"| 00002f70 2b 61 64 64 72 65 73 73 24 29 0d 14 dc 05 e1 0d |+address$)......| 00002f80 14 e6 05 3a 0d 14 f0 0a dd 20 f2 65 6e 64 0d 14 |...:..... .end..| 00002f90 fa 07 ef 32 36 0d 15 04 05 db 0d 15 0e 30 f1 20 |...26........0. | 00002fa0 27 27 27 bd 31 33 31 22 20 20 20 54 68 65 20 70 |'''.131" The p| 00002fb0 72 6f 67 72 61 6d 20 68 61 73 20 62 65 65 6e 20 |rogram has been | 00002fc0 73 61 76 65 64 20 61 73 3a 22 0d 15 18 2a f1 20 |saved as:"...*. | 00002fd0 27 8a 31 39 2d 28 a9 28 66 69 6c 65 6e 61 6d 65 |'.19-(.(filename| 00002fe0 24 29 2f 32 29 29 bd 31 33 34 3b 66 69 6c 65 6e |$)/2)).134;filen| 00002ff0 61 6d 65 24 0d 15 22 35 f1 20 27 27 bd 31 33 31 |ame$.."5. ''.131| 00003000 22 44 6f 6e 27 74 20 66 6f 72 67 65 74 20 74 6f |"Don't forget to| 00003010 20 73 61 76 65 20 54 48 49 53 20 42 61 73 69 63 | save THIS Basic| 00003020 20 70 72 6f 67 72 61 6d 22 0d 15 2c 30 f1 20 bd | program"..,0. .| 00003030 31 33 31 22 20 20 20 74 6f 6f 2c 20 69 74 20 63 |131" too, it c| 00003040 6f 6e 74 61 69 6e 73 20 74 68 65 20 73 6f 75 72 |ontains the sour| 00003050 63 65 20 63 6f 64 65 21 22 0d 15 36 08 f1 20 27 |ce code!"..6.. '| 00003060 27 0d 15 40 09 f2 63 5f 6f 6e 0d 15 4a 05 e0 0d |'..@..c_on..J...| 00003070 15 54 05 e1 0d 15 5e 05 3a 0d 15 68 15 dd 20 f2 |.T....^.:..h.. .| 00003080 61 73 73 65 6d 62 6c 65 5f 74 6f 6f 6c 73 0d 15 |assemble_tools..| 00003090 72 05 3a 0d 15 7c 15 e3 20 70 61 73 73 25 3d 30 |r.:..|.. pass%=0| 000030a0 20 b8 20 32 20 88 20 32 0d 15 86 0c 50 25 3d 63 | . 2 . 2....P%=c| 000030b0 6f 64 65 25 0d 15 90 0e 5b 4f 50 54 20 70 61 73 |ode%....[OPT pas| 000030c0 73 25 0d 15 9a 0f 2e 68 65 78 5f 73 74 72 69 6e |s%.....hex_strin| 000030d0 67 0d 15 a4 30 53 54 41 20 26 37 30 20 20 20 20 |g...0STA &70 | 000030e0 20 20 20 20 20 20 20 5c 53 61 76 65 20 62 79 74 | \Save byt| 000030f0 65 73 20 66 6f 72 20 66 75 74 75 72 65 20 75 73 |es for future us| 00003100 65 0d 15 ae 0b 53 54 58 20 26 37 31 0d 15 b8 0a |e....STX &71....| 00003110 4c 44 41 20 23 30 0d 15 c2 32 53 54 41 20 68 65 |LDA #0...2STA he| 00003120 78 61 64 64 72 20 20 20 20 20 20 20 5c 43 6c 65 |xaddr \Cle| 00003130 61 72 20 68 65 78 20 73 74 72 69 6e 67 20 74 6f |ar hex string to| 00003140 20 6e 6f 74 68 69 6e 67 0d 15 cc 11 53 54 41 20 | nothing....STA | 00003150 68 65 78 61 64 64 72 2b 31 0d 15 d6 11 53 54 41 |hexaddr+1....STA| 00003160 20 68 65 78 61 64 64 72 2b 32 0d 15 e0 11 53 54 | hexaddr+2....ST| 00003170 41 20 68 65 78 61 64 64 72 2b 33 0d 15 ea 34 4c |A hexaddr+3...4L| 00003180 44 41 20 23 26 44 20 20 20 20 20 20 20 20 20 20 |DA #&D | 00003190 20 5c 53 65 74 20 3c 43 52 3e 20 61 74 20 65 6e | \Set <CR> at en| 000031a0 64 20 6f 66 20 68 65 78 20 73 74 72 69 6e 67 0d |d of hex string.| 000031b0 15 f4 11 53 54 41 20 68 65 78 61 64 64 72 2b 34 |...STA hexaddr+4| 000031c0 0d 15 fe 0b 4c 44 41 20 26 37 30 0d 16 08 32 80 |....LDA &70...2.| 000031d0 20 23 26 46 20 20 20 20 20 20 20 20 20 20 20 5c | #&F \| 000031e0 46 69 6e 64 20 6c 6f 77 65 72 20 6e 79 62 62 6c |Find lower nybbl| 000031f0 65 20 6f 66 20 6c 6f 77 20 62 79 74 65 0d 16 12 |e of low byte...| 00003200 2f 4a 53 52 20 63 6f 6e 76 65 72 74 20 20 20 20 |/JSR convert | 00003210 20 20 20 5c 46 69 6e 64 20 97 49 49 20 76 61 6c | \Find .II val| 00003220 75 65 20 6f 66 20 6e 79 62 62 6c 65 0d 16 1c 26 |ue of nybble...&| 00003230 53 54 41 20 68 65 78 61 64 64 72 2b 33 20 20 20 |STA hexaddr+3 | 00003240 20 20 5c 53 74 6f 72 65 20 69 6e 20 73 74 72 69 | \Store in stri| 00003250 6e 67 0d 16 26 07 54 58 41 0d 16 30 33 80 20 23 |ng..&.TXA..03. #| 00003260 26 46 20 20 20 20 20 20 20 20 20 20 20 5c 46 69 |&F \Fi| 00003270 6e 64 20 6c 6f 77 65 72 20 6e 79 62 62 6c 65 20 |nd lower nybble | 00003280 6f 66 20 68 69 67 68 20 62 79 74 65 0d 16 3a 1f |of high byte..:.| 00003290 4a 53 52 20 63 6f 6e 76 65 72 74 20 20 20 20 20 |JSR convert | 000032a0 20 20 5c 61 73 20 61 62 6f 76 65 0d 16 44 11 53 | \as above..D.S| 000032b0 54 41 20 68 65 78 61 64 64 72 2b 31 0d 16 4e 35 |TA hexaddr+1..N5| 000032c0 4c 44 41 20 26 37 30 20 20 20 20 20 20 20 20 20 |LDA &70 | 000032d0 20 20 5c 46 69 6e 64 20 68 69 67 68 65 72 20 6e | \Find higher n| 000032e0 79 62 62 6c 65 20 6f 66 20 6c 6f 77 20 62 79 74 |ybble of low byt| 000032f0 65 0d 16 58 1b 4c 53 52 20 41 3a 4c 53 52 20 41 |e..X.LSR A:LSR A| 00003300 3a 4c 53 52 20 41 3a 4c 53 52 20 41 0d 16 62 1f |:LSR A:LSR A..b.| 00003310 4a 53 52 20 63 6f 6e 76 65 72 74 20 20 20 20 20 |JSR convert | 00003320 20 20 5c 61 73 20 61 62 6f 76 65 0d 16 6c 11 53 | \as above..l.S| 00003330 54 41 20 68 65 78 61 64 64 72 2b 32 0d 16 76 36 |TA hexaddr+2..v6| 00003340 4c 44 41 20 26 37 31 20 20 20 20 20 20 20 20 20 |LDA &71 | 00003350 20 20 5c 46 69 6e 64 20 68 69 67 68 65 72 20 6e | \Find higher n| 00003360 79 62 62 6c 65 20 6f 66 20 68 69 67 68 20 62 79 |ybble of high by| 00003370 74 65 0d 16 80 1b 4c 53 52 20 41 3a 4c 53 52 20 |te....LSR A:LSR | 00003380 41 3a 4c 53 52 20 41 3a 4c 53 52 20 41 0d 16 8a |A:LSR A:LSR A...| 00003390 1f 4a 53 52 20 63 6f 6e 76 65 72 74 20 20 20 20 |.JSR convert | 000033a0 20 20 20 5c 61 73 20 61 62 6f 76 65 0d 16 94 0f | \as above....| 000033b0 53 54 41 20 68 65 78 61 64 64 72 0d 16 9e 07 52 |STA hexaddr....R| 000033c0 54 53 0d 16 a8 42 2e 63 6f 6e 76 65 72 74 20 20 |TS...B.convert | 000033d0 20 20 20 20 20 20 20 20 5c 53 55 42 52 4f 55 54 | \SUBROUT| 000033e0 49 4e 45 20 72 65 74 75 72 6e 73 20 97 49 49 20 |INE returns .II | 000033f0 76 61 6c 75 65 20 6f 66 20 6e 79 62 62 6c 65 20 |value of nybble | 00003400 69 6e 20 41 0d 16 b2 31 43 4d 50 20 23 31 30 20 |in A...1CMP #10 | 00003410 20 20 20 20 20 20 20 20 20 20 5c 49 73 20 6e 79 | \Is ny| 00003420 62 62 6c 65 20 61 6c 70 68 61 3f 20 28 69 2e 65 |bble alpha? (i.e| 00003430 2e 20 3e 39 29 0d 16 bc 33 42 50 4c 20 61 6c 70 |. >9)...3BPL alp| 00003440 68 61 20 20 20 20 20 20 20 20 20 5c 49 66 20 73 |ha \If s| 00003450 6f 2c 20 6a 75 6d 70 20 74 6f 20 61 6c 70 68 61 |o, jump to alpha| 00003460 20 72 6f 75 74 69 6e 65 0d 16 c6 38 43 4c 43 20 | routine...8CLC | 00003470 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 4f | \O| 00003480 74 68 65 72 77 69 73 65 20 61 64 64 20 34 38 20 |therwise add 48 | 00003490 74 6f 20 69 74 20 61 6e 64 20 72 65 74 75 72 6e |to it and return| 000034a0 0d 16 d0 0b 41 44 43 20 23 34 38 0d 16 da 07 52 |....ADC #48....R| 000034b0 54 53 0d 16 e4 3c 2e 61 6c 70 68 61 20 20 20 20 |TS...<.alpha | 000034c0 20 20 20 20 20 20 20 20 5c 49 74 27 73 20 61 6c | \It's al| 000034d0 70 68 61 20 73 6f 20 61 64 64 20 35 35 20 74 6f |pha so add 55 to| 000034e0 20 69 74 20 61 6e 64 20 72 65 74 75 72 6e 0d 16 | it and return..| 000034f0 ee 07 43 4c 43 0d 16 f8 0b 41 44 43 20 23 35 35 |..CLC....ADC #55| 00003500 0d 17 02 07 52 54 53 0d 17 0c 0e 2e 68 65 78 5f |....RTS.....hex_| 00003510 69 6e 70 75 74 0d 17 16 33 4c 44 58 20 23 30 20 |input...3LDX #0 | 00003520 20 20 20 20 20 20 20 20 20 20 5c 53 65 74 20 63 | \Set c| 00003530 68 61 72 61 63 74 65 72 20 63 6f 75 6e 74 65 72 |haracter counter| 00003540 2f 70 6f 69 6e 74 65 72 0d 17 20 37 2e 67 65 74 |/pointer.. 7.get| 00003550 5f 63 68 61 72 20 20 20 20 20 20 20 20 5c 67 65 |_char \ge| 00003560 74 20 61 20 63 68 61 72 61 63 74 65 72 20 66 72 |t a character fr| 00003570 6f 6d 20 69 6e 70 75 74 20 73 74 72 65 61 6d 0d |om input stream.| 00003580 17 2a 0e 4a 53 52 20 6f 73 72 64 63 68 0d 17 34 |.*.JSR osrdch..4| 00003590 2c 42 43 53 20 65 72 72 6f 72 20 20 20 20 20 20 |,BCS error | 000035a0 20 20 5c 54 72 61 70 20 69 6e 76 61 6c 69 64 20 | \Trap invalid | 000035b0 63 68 61 72 61 63 74 65 72 0d 17 3e 0b 43 4d 50 |character..>.CMP| 000035c0 20 23 31 33 0d 17 48 2d 42 45 51 20 65 6e 64 5f | #13..H-BEQ end_| 000035d0 65 6e 74 72 79 20 20 20 20 5c 44 65 74 65 63 74 |entry \Detect| 000035e0 20 61 6e 64 20 61 63 74 20 75 70 6f 6e 20 3c f8 | and act upon <.| 000035f0 3e 0d 17 52 0c 43 4d 50 20 23 31 32 37 0d 17 5c |>..R.CMP #127..\| 00003600 2d 42 45 51 20 64 65 6c 65 74 65 20 20 20 20 20 |-BEQ delete | 00003610 20 20 5c 44 65 74 65 63 74 20 61 6e 64 20 61 63 | \Detect and ac| 00003620 74 20 75 70 6f 6e 20 3c c7 3e 0d 17 66 48 43 4d |t upon <.>..fHCM| 00003630 50 20 23 34 38 20 20 20 20 20 20 20 20 20 20 5c |P #48 \| 00003640 52 61 6e 67 65 20 63 68 65 63 6b 2e 20 50 61 73 |Range check. Pas| 00003650 73 20 6f 6e 6c 79 20 30 2d 39 20 61 6e 64 20 41 |s only 0-9 and A| 00003660 2d 45 20 28 6e 6f 20 6c 6f 77 65 72 20 63 61 73 |-E (no lower cas| 00003670 65 29 0d 17 70 0c 42 4d 49 20 62 65 65 70 0d 17 |e)..p.BMI beep..| 00003680 7a 0b 43 4d 50 20 23 37 31 0d 17 84 0c 42 50 4c |z.CMP #71....BPL| 00003690 20 62 65 65 70 0d 17 8e 0b 43 4d 50 20 23 35 38 | beep....CMP #58| 000036a0 0d 17 98 0a 42 4d 49 20 6f 6b 0d 17 a2 0b 43 4d |....BMI ok....CM| 000036b0 50 20 23 36 35 0d 17 ac 0c 42 4d 49 20 62 65 65 |P #65....BMI bee| 000036c0 70 0d 17 b6 07 2e 6f 6b 0d 17 c0 3f 43 50 58 20 |p.....ok...?CPX | 000036d0 23 34 20 20 20 20 20 20 20 20 20 20 20 5c 44 65 |#4 \De| 000036e0 74 65 63 74 20 73 6e 65 61 6b 79 20 74 72 79 20 |tect sneaky try | 000036f0 61 74 20 65 6e 74 65 72 69 6e 67 20 61 20 35 74 |at entering a 5t| 00003700 68 20 64 69 67 69 74 0d 17 ca 0c 42 45 51 20 62 |h digit....BEQ b| 00003710 65 65 70 0d 17 d4 2c 53 54 41 20 68 65 78 61 64 |eep...,STA hexad| 00003720 64 72 2c 58 20 20 20 20 5c 41 64 64 20 63 68 72 |dr,X \Add chr| 00003730 61 63 74 65 72 20 74 6f 20 73 74 72 69 6e 67 0d |acter to string.| 00003740 17 de 2c 49 4e 58 20 20 20 20 20 20 20 20 20 20 |..,INX | 00003750 20 20 20 20 5c 55 70 64 61 74 65 20 63 6f 75 6e | \Update coun| 00003760 74 65 72 2f 70 6f 69 6e 74 65 72 0d 17 e8 2d 4a |ter/pointer...-J| 00003770 53 52 20 6f 73 77 72 63 68 20 20 20 20 20 20 20 |SR oswrch | 00003780 5c 50 75 74 20 63 68 61 72 61 63 74 65 72 20 6f |\Put character o| 00003790 6e 20 73 63 72 65 65 6e 0d 17 f2 10 4a 4d 50 20 |n screen....JMP | 000037a0 67 65 74 5f 63 68 61 72 0d 17 fc 39 2e 62 65 65 |get_char...9.bee| 000037b0 70 20 20 20 20 20 20 20 20 20 20 20 20 5c 4d 61 |p \Ma| 000037c0 6b 65 20 61 20 62 65 65 70 20 61 6e 64 20 67 6f |ke a beep and go| 000037d0 20 62 61 63 6b 20 74 6f 20 67 65 74 5f 63 68 61 | back to get_cha| 000037e0 72 0d 18 06 0a 4c 44 41 20 23 37 0d 18 10 0e 4a |r....LDA #7....J| 000037f0 53 52 20 6f 73 77 72 63 68 0d 18 1a 10 4a 4d 50 |SR oswrch....JMP| 00003800 20 67 65 74 5f 63 68 61 72 0d 18 24 27 2e 65 72 | get_char..$'.er| 00003810 72 6f 72 20 20 20 20 20 20 20 20 20 20 20 5c 4a |ror \J| 00003820 75 6d 70 20 6f 75 74 20 6f 6e 20 65 72 72 6f 72 |ump out on error| 00003830 0d 18 2e 07 52 54 53 0d 18 38 24 2e 64 65 6c 65 |....RTS..8$.dele| 00003840 74 65 20 20 20 20 20 20 20 20 20 20 5c 41 63 74 |te \Act| 00003850 69 6f 6e 20 3c c7 3e 20 6b 65 79 0d 18 42 0a 43 |ion <.> key..B.C| 00003860 50 58 20 23 30 0d 18 4c 43 42 45 51 20 62 65 65 |PX #0..LCBEQ bee| 00003870 70 20 20 20 20 20 20 20 20 20 5c 49 66 20 6e 6f |p \If no| 00003880 74 68 69 6e 67 20 74 6f 20 64 65 6c 65 74 65 2c |thing to delete,| 00003890 20 62 65 65 70 20 61 6e 64 20 67 6f 20 74 6f 20 | beep and go to | 000038a0 67 65 74 5f 63 68 61 72 0d 18 56 0a 4c 44 41 20 |get_char..V.LDA | 000038b0 23 38 0d 18 60 0e 4a 53 52 20 6f 73 77 72 63 68 |#8..`.JSR oswrch| 000038c0 0d 18 6a 0b 4c 44 41 20 23 33 32 0d 18 74 0e 4a |..j.LDA #32..t.J| 000038d0 53 52 20 6f 73 77 72 63 68 0d 18 7e 0a 4c 44 41 |SR oswrch..~.LDA| 000038e0 20 23 38 0d 18 88 0e 4a 53 52 20 6f 73 77 72 63 | #8....JSR oswrc| 000038f0 68 0d 18 92 07 44 45 58 0d 18 9c 10 4a 4d 50 20 |h....DEX....JMP | 00003900 67 65 74 5f 63 68 61 72 0d 18 a6 2d 2e 65 6e 64 |get_char...-.end| 00003910 5f 65 6e 74 72 79 20 20 20 20 20 20 20 5c 45 78 |_entry \Ex| 00003920 69 74 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 72 6f |it collection ro| 00003930 75 74 69 6e 65 0d 18 b0 2c 43 50 58 20 23 34 20 |utine...,CPX #4 | 00003940 20 20 20 20 20 20 20 20 20 20 5c 41 6c 6c 20 34 | \All 4| 00003950 20 63 68 61 72 61 63 74 65 72 73 20 75 73 65 64 | characters used| 00003960 3f 0d 18 ba 10 42 45 51 20 65 76 61 6c 75 61 74 |?....BEQ evaluat| 00003970 65 0d 18 c4 2c 43 50 58 20 23 30 20 20 20 20 20 |e...,CPX #0 | 00003980 20 20 20 20 20 20 5c 4e 6f 20 63 68 61 72 61 63 | \No charac| 00003990 74 65 72 73 20 65 6e 74 65 72 65 64 3f 0d 18 ce |ters entered?...| 000039a0 12 42 45 51 20 71 75 69 63 6b 5f 65 78 69 74 0d |.BEQ quick_exit.| 000039b0 18 d8 34 53 54 58 20 26 37 30 20 20 20 20 20 20 |..4STX &70 | 000039c0 20 20 20 20 5c 49 66 20 6e 6f 74 2c 20 70 61 64 | \If not, pad| 000039d0 20 77 69 74 68 20 6c 65 61 64 69 6e 67 20 7a 65 | with leading ze| 000039e0 72 6f 73 0d 18 e2 0a 4c 44 41 20 23 34 0d 18 ec |ros....LDA #4...| 000039f0 07 53 45 43 0d 18 f6 31 53 42 43 20 26 37 30 20 |.SEC...1SBC &70 | 00003a00 20 20 20 20 20 20 20 20 20 5c 46 69 6e 64 20 68 | \Find h| 00003a10 6f 77 20 6d 61 6e 79 20 73 70 61 63 65 73 20 74 |ow many spaces t| 00003a20 6f 20 70 61 64 0d 19 00 0b 53 54 41 20 26 37 30 |o pad....STA &70| 00003a30 0d 19 0a 36 44 45 58 20 20 20 20 20 20 20 20 20 |...6DEX | 00003a40 20 20 20 20 20 5c 43 68 61 6e 67 65 20 58 20 66 | \Change X f| 00003a50 72 6f 6d 20 63 6f 75 6e 74 65 72 20 74 6f 20 70 |rom counter to p| 00003a60 6f 69 6e 74 65 72 0d 19 14 07 54 58 41 0d 19 1e |ointer....TXA...| 00003a70 07 43 4c 43 0d 19 28 0b 41 44 43 20 26 37 30 0d |.CLC..(.ADC &70.| 00003a80 19 32 33 54 41 59 20 20 20 20 20 20 20 20 20 20 |.23TAY | 00003a90 20 20 20 20 5c 53 65 74 20 59 20 74 6f 20 70 6f | \Set Y to po| 00003aa0 69 6e 74 20 61 74 20 74 61 72 67 65 74 20 62 79 |int at target by| 00003ab0 74 65 0d 19 3c 38 2e 73 68 69 66 74 20 20 20 20 |te..<8.shift | 00003ac0 20 20 20 20 20 20 20 5c 53 68 69 66 74 20 76 61 | \Shift va| 00003ad0 6c 69 64 20 63 68 61 72 73 20 74 6f 20 65 6e 64 |lid chars to end| 00003ae0 20 6f 66 20 73 74 72 69 6e 67 0d 19 46 11 4c 44 | of string..F.LD| 00003af0 41 20 68 65 78 61 64 64 72 2c 58 0d 19 50 11 53 |A hexaddr,X..P.S| 00003b00 54 41 20 68 65 78 61 64 64 72 2c 59 0d 19 5a 07 |TA hexaddr,Y..Z.| 00003b10 44 45 59 0d 19 64 07 44 45 58 0d 19 6e 10 42 4d |DEY..d.DEX..n.BM| 00003b20 49 20 63 6f 6e 74 69 6e 75 65 0d 19 78 0d 4a 4d |I continue..x.JM| 00003b30 50 20 73 68 69 66 74 0d 19 82 0d 2e 63 6f 6e 74 |P shift.....cont| 00003b40 69 6e 75 65 0d 19 8c 28 4c 44 59 20 23 30 20 20 |inue...(LDY #0 | 00003b50 20 20 20 20 20 20 20 20 20 20 5c 41 64 64 20 6c | \Add l| 00003b60 65 61 64 69 6e 67 20 7a 65 72 6f 73 0d 19 96 20 |eading zeros... | 00003b70 4c 44 41 20 23 34 38 20 20 20 20 20 20 20 20 20 |LDA #48 | 00003b80 20 20 5c 28 97 49 49 20 22 30 22 29 0d 19 a0 08 | \(.II "0")....| 00003b90 2e 70 61 64 0d 19 aa 11 53 54 41 20 68 65 78 61 |.pad....STA hexa| 00003ba0 64 64 72 2c 59 0d 19 b4 07 49 4e 59 0d 19 be 0b |ddr,Y....INY....| 00003bb0 43 50 59 20 26 37 30 0d 19 c8 0b 42 4e 45 20 70 |CPY &70....BNE p| 00003bc0 61 64 0d 19 d2 39 2e 65 76 61 6c 75 61 74 65 20 |ad...9.evaluate | 00003bd0 20 20 20 20 20 20 20 5c 44 65 63 6f 64 65 20 68 | \Decode h| 00003be0 65 78 20 73 74 72 69 6e 67 20 74 6f 20 32 20 62 |ex string to 2 b| 00003bf0 79 74 65 20 69 6e 74 65 67 65 72 0d 19 dc 11 4c |yte integer....L| 00003c00 44 41 20 68 65 78 61 64 64 72 2b 33 0d 19 e6 2a |DA hexaddr+3...*| 00003c10 4a 53 52 20 64 65 63 6f 64 65 20 20 20 20 20 20 |JSR decode | 00003c20 20 5c 4c 6f 77 20 6e 79 62 62 6c 65 2c 20 6c 6f | \Low nybble, lo| 00003c30 77 20 62 79 74 65 0d 19 f0 0b 53 54 41 20 26 37 |w byte....STA &7| 00003c40 30 0d 19 fa 2b 4c 44 41 20 68 65 78 61 64 64 72 |0...+LDA hexaddr| 00003c50 2b 32 20 20 20 20 5c 68 69 67 68 20 6e 79 62 62 |+2 \high nybb| 00003c60 6c 65 2c 20 6c 6f 77 20 62 79 74 65 0d 1a 04 0e |le, low byte....| 00003c70 4a 53 52 20 64 65 63 6f 64 65 0d 1a 0e 1b 41 53 |JSR decode....AS| 00003c80 4c 20 41 3a 41 53 4c 20 41 3a 41 53 4c 20 41 3a |L A:ASL A:ASL A:| 00003c90 41 53 4c 20 41 0d 1a 18 07 43 4c 43 0d 1a 22 3e |ASL A....CLC..">| 00003ca0 41 44 43 20 26 37 30 20 20 20 20 20 20 20 20 20 |ADC &70 | 00003cb0 20 20 5c 41 64 64 20 74 77 6f 20 6e 79 62 62 6c | \Add two nybbl| 00003cc0 65 73 20 74 6f 67 65 74 68 65 72 20 61 6e 64 20 |es together and | 00003cd0 73 74 6f 72 65 20 69 6e 20 59 0d 1a 2c 07 54 41 |store in Y..,.TA| 00003ce0 59 0d 1a 36 2c 4c 44 41 20 68 65 78 61 64 64 72 |Y..6,LDA hexaddr| 00003cf0 2b 31 20 20 20 20 20 5c 4c 6f 77 20 6e 79 62 62 |+1 \Low nybb| 00003d00 6c 65 2c 20 68 69 67 68 20 62 79 74 65 0d 1a 40 |le, high byte..@| 00003d10 0e 4a 53 52 20 64 65 63 6f 64 65 0d 1a 4a 0b 53 |.JSR decode..J.S| 00003d20 54 41 20 26 37 30 0d 1a 54 2d 4c 44 41 20 68 65 |TA &70..T-LDA he| 00003d30 78 61 64 64 72 20 20 20 20 20 20 20 5c 48 69 67 |xaddr \Hig| 00003d40 68 20 6e 79 62 62 6c 65 2c 20 68 69 67 68 20 62 |h nybble, high b| 00003d50 79 74 65 0d 1a 5e 0e 4a 53 52 20 64 65 63 6f 64 |yte..^.JSR decod| 00003d60 65 0d 1a 68 1b 41 53 4c 20 41 3a 41 53 4c 20 41 |e..h.ASL A:ASL A| 00003d70 3a 41 53 4c 20 41 3a 41 53 4c 20 41 0d 1a 72 07 |:ASL A:ASL A..r.| 00003d80 43 4c 43 0d 1a 7c 3e 41 44 43 20 26 37 30 20 20 |CLC..|>ADC &70 | 00003d90 20 20 20 20 20 20 20 20 20 5c 41 64 64 20 74 77 | \Add tw| 00003da0 6f 20 6e 79 62 62 6c 65 73 20 74 6f 67 65 74 68 |o nybbles togeth| 00003db0 65 72 20 61 6e 64 20 73 74 6f 72 65 20 69 6e 20 |er and store in | 00003dc0 58 0d 1a 86 07 54 41 58 0d 1a 90 37 54 59 41 20 |X....TAX...7TYA | 00003dd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 4d | \M| 00003de0 6f 76 65 20 6c 6f 77 20 62 79 74 65 20 62 61 63 |ove low byte bac| 00003df0 6b 20 69 6e 74 6f 20 41 20 26 20 65 78 69 74 0d |k into A & exit.| 00003e00 1a 9a 07 52 54 53 0d 1a a4 2f 2e 64 65 63 6f 64 |...RTS.../.decod| 00003e10 65 20 20 20 20 20 20 20 20 20 20 20 5c 4e 79 62 |e \Nyb| 00003e20 62 6c 65 20 64 65 63 6f 64 65 20 73 75 62 72 6f |ble decode subro| 00003e30 75 74 69 6e 65 0d 1a ae 21 43 4d 50 20 23 35 38 |utine...!CMP #58| 00003e40 20 20 20 20 20 20 20 20 20 20 20 5c 49 73 20 69 | \Is i| 00003e50 74 20 3e 20 39 3f 0d 1a b8 11 42 50 4c 20 64 65 |t > 9?....BPL de| 00003e60 63 5f 61 6c 70 68 61 0d 1a c2 2a 53 45 43 20 20 |c_alpha...*SEC | 00003e70 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 49 66 | \If| 00003e80 20 6e 6f 74 2c 20 73 75 62 74 72 61 63 74 20 34 | not, subtract 4| 00003e90 38 0d 1a cc 0b 53 42 43 20 23 34 38 0d 1a d6 07 |8....SBC #48....| 00003ea0 52 54 53 0d 1a e0 0e 2e 64 65 63 5f 61 6c 70 68 |RTS.....dec_alph| 00003eb0 61 0d 1a ea 34 53 45 43 20 20 20 20 20 20 20 20 |a...4SEC | 00003ec0 20 20 20 20 20 20 20 5c 49 66 20 69 74 20 69 73 | \If it is| 00003ed0 2c 20 73 75 62 74 72 61 63 74 20 35 35 20 28 41 |, subtract 55 (A| 00003ee0 4c 50 48 41 29 0d 1a f4 0b 53 42 43 20 23 35 35 |LPHA)....SBC #55| 00003ef0 0d 1a fe 07 52 54 53 0d 1b 08 45 2e 71 75 69 63 |....RTS...E.quic| 00003f00 6b 5f 65 78 69 74 20 20 20 20 20 20 20 5c 55 73 |k_exit \Us| 00003f10 65 64 20 6f 6e 6c 79 20 69 66 20 6e 6f 20 63 68 |ed only if no ch| 00003f20 61 72 61 63 74 65 72 73 20 65 6e 74 65 72 65 64 |aracters entered| 00003f30 20 28 65 73 73 65 6e 74 69 61 6c 29 0d 1b 12 0a | (essential)....| 00003f40 4c 44 41 20 23 30 0d 1b 1c 07 54 41 58 0d 1b 26 |LDA #0....TAX..&| 00003f50 07 52 54 53 0d 1b 30 05 5d 0d 1b 3a 0b ed 20 70 |.RTS..0.]..:.. p| 00003f60 61 73 73 25 0d 1b 44 05 e1 0d 1b 4e 05 3a 0d ff |ass%..D....N.:..| 00003f70