P728 CEEFAX 728 Wed 30 Dec 21:38/07 |B2201216|a16ClkSet|i13BAS|m10÷e÷X÷b%÷L SETCLOCK PROGRAM FOR MASTER 128÷e÷X÷l÷q÷ L (C) Ian Stubbs 1986÷e÷X÷v÷r÷L REQUIRES BBC ATS ROM÷e÷X(÷]:÷e÷X2÷#÷C 7÷e÷X<÷c÷+ =&7000÷e÷XF÷g÷6 code% 280÷e÷XP÷g÷6 hexad dr 5÷e÷XZ÷hosasci=&FFE3÷e÷Xd÷hosrdch=&FF E0÷e÷Xn÷hoswrch=&FFEE÷e÷Xx÷hosbyte=&FFF4 ÷e÷X—*÷hosword=&FFF1÷e÷X—4÷goscli=&FFF7÷ e÷X—>÷k÷Jassemble#tools÷e÷X—H÷l÷Mbssembl e(&7000)÷e÷X—R÷i÷Jinstructions÷e÷X—\÷a÷J demo÷e÷X—f÷i÷Jcollect#data÷e÷X—p÷n÷Mbsse mble(address)÷e÷X÷*÷a÷Jsave÷e÷X÷4÷|—÷Jen d÷e÷X÷>÷]:÷e÷X÷H÷h÷L P2OCEDURES÷e÷X÷R÷]: ÷e÷Y÷\÷o÷5 ÷Nassemble(origin)÷e÷Y÷f÷]:÷e ÷Y÷p÷mpara%=origin+&1E0÷e÷Yb÷m÷; pass%=4 —|— 6 —0 2÷e÷Y,÷eP%=origin÷e÷Y6÷dO%=&70 00÷e÷Y@÷f[OPT pass%÷e÷YJ÷bnbegin÷e÷YT÷cL DA £&D÷e÷Y^÷eSTA para%÷e÷Yh5JSR ttx#comm and \Switch on Tflextext interrupts÷e÷ Yr÷bLDA £1÷e÷Y||÷eSTA para%÷e÷Y—.÷bLDA £ 0÷e÷Y—8÷gSTA para%+1÷e÷Y—B+JSR ttx#comma nd \Set channel to BBC-1÷e÷Y—L÷eJSR de lay÷e÷Y—V÷eJSR delay÷e÷Y—|—÷bLDA £1÷e|c
P728 CEEFAX 728 Wed 30 Dec 21:00/01 para%-4 \Set magazine number to 1 for BBC-1 target page (100)÷e÷Y—t÷cLDA £17÷e÷Y÷.÷eSTA para%÷e÷Y÷83JSR ttx#comma nd \Read Teletext Adaptor Status÷e÷Y÷B ÷gLDA para%+1÷e÷Y÷L÷dCMP £&FF÷e÷Y÷V÷jBA no#adaptor÷e÷Z÷|—÷bCMP £2÷e÷Z÷j÷kBAQ ad aptor#off÷e÷Z÷t÷bCMP £1÷e÷Z&÷iBK0 no#sig nal÷e÷Z0÷eJMP start÷e÷Z:÷g.no#adaptor÷e÷ ZD÷dJSR exit÷e÷ZN÷#BRK÷e÷ZX÷dE PBFF Zb÷m@ TSNAZ#BRKZ daptor#off÷e÷Z—(÷dJSR exit÷e÷Z—2÷#BRK÷e÷ Z—<÷cEQUB 50÷e÷Z—F÷nE TSA ÷Z—P÷#BRK÷e÷Z—Z÷f.no#signal÷e÷Z—d÷bLDA £ 1÷e÷Z—n÷eSTA para%÷e÷Z÷(÷gSTA para%+1÷e÷ Z÷23JSR ttx#command \Change chann el to BBC-2÷e÷Z÷<÷bLDA £2÷e÷Z÷FSSTA para %-4 \Change magazine number o f target page to 2 (200), BBC-2÷e÷Z÷P÷eJ SR delay÷e÷[÷Z÷eJSR delay÷e÷[÷d÷eJSR del ay÷e÷[÷n÷eJSR delay÷e÷[ ÷cLDA £17÷e÷[*÷e STA para%÷e÷[45JSR ttx#command \R ead Adaptor Status again÷e÷[>÷gLDA p|c
P728 CEEFAX 728 Wed 30 Dec 21:20/01 |B2202216|a16ClkSet|i13BAS|m32C3÷Y—jKSTA para% 4 \Set magazine number to 1 £17÷e÷Y÷.÷eSTA para%÷e÷Y÷83JSR ttx#comma nd \Read dletext Adaptor Status÷e÷Y÷B ÷gLDA para%+1÷e÷Y÷L÷dCMP £&FF÷e÷Y÷V÷jBEQ no#adaptor÷e÷Z÷|—÷bCMP £2÷e÷X÷j÷s@EQ ad aptor#off÷e÷Z÷t÷bCMP £1÷e÷X&÷iBEQ no#sig nal÷e÷Z0÷eJMP start÷e÷Z:÷g.no#adaptor÷e÷ ZD÷dJSR exit÷e÷ZN÷#BRK÷e÷ZX÷dC0VB &FF÷e÷ Zb÷mDQUS "No Adaptor"÷e÷Zl÷#BRK÷e÷Zv÷h.a daptor#off÷e÷Z—(÷dJSR exit÷e÷Z—2÷#BRK÷e÷ Z—<÷cE PBZFA TSA ÷Z—P÷#BRK÷e÷Z—Z÷f.no#signal÷e÷Z—d÷bLDA £ 1÷e÷Z—n÷eSTA para%÷e÷Z÷(÷gSTA para%+1÷e÷ Z÷23JSR ttx#command \Change chann el to BBC-2÷e÷Z÷<÷bLDA £2÷e÷Z÷FSSTA para %-4 \Change magazine number o f target p—ge to 2 (200), BBC-2÷e÷Z÷P÷eJ SR delay÷e÷[÷Z÷eJSR delay÷e÷[÷d÷eHSR del ay÷e÷[÷n÷eJSR delay÷e÷[ ÷cLDA £17÷e÷[*÷e STA para%÷e÷[45JSR ttx#command \R ead Adaptor Status again÷e÷[>÷gLDA p|c
P728 CEEFAX 728 Wed 30 Dec 21:31/13 |B2203216|a16ClkSet|i13BAS|m35ADara%+1÷e ÷[HEBEQ start \If signal fo und then start program proper÷e÷[R÷dJSR exit÷e÷[\,BRK \else f lag error.÷e÷[f÷cEQUB 51÷e÷[p÷lEQUS bNo CEEFAX"÷e÷[z÷#BRK÷e÷[—,÷b.start÷e÷[—6÷bL DA £7÷e÷[—@÷eSTA para%÷e÷[—J÷bLDA £1÷e÷[ —T÷gSTA para%+1÷e÷[—^ENS5 ttx#command \Set page capture routine to get HEADE R —. ÷FLY÷e÷[—h÷bLDA £0÷e÷[—r/STA para%+ 16 \Set header detect byte÷e÷[÷,÷ bLDA £5÷e÷[÷6÷eSTA para%÷e÷[÷@÷cLDA £18÷ e÷[÷J÷gSTA para%+1÷e÷[÷T÷gLDA para%m4÷e÷ \÷^÷gSTA para%+2÷e÷\÷h÷bLDA £0÷e÷\÷r÷gST A para%+3÷e÷\$÷dLDA £&3F÷e÷\.÷gSTA para% +4÷e÷\8÷dLDA £&7F÷e÷\B÷gSTA para%+5÷e÷\L ÷nLDA £(para% —+ 256)÷e÷\V÷gSTA para%+6÷ e÷\|—÷nLDA £(para% —) 256)÷e÷\j÷gSTA par a%+7÷e÷\tHJSR ttx#command \Get page 100 from CEEFAX (BBC-1) or 200 (BBC-2)÷e ÷\|÷JLDA £&FF \Set "give up l ooking for header" threshold byte 1÷e÷\— 0÷gSTA para%-1÷e÷\—:£LDA £&3F |c
P728 CEEFAX 728 Wed 30 Dec 21:01/00 |B2204216|a16ClkSet|i13@AS|m38AA \Se t byte 2÷e÷\—D÷gSTA para%-2÷e÷\—N÷l lest #for#header÷e÷\—X÷hLDA para$+16÷e÷\—b0BN E get#time \Check if header arriv ed÷e÷\—l;LDY £0 \If not, wa it a bit then test again÷e÷\—v÷a.wait÷e÷ \÷0÷#NOP÷e÷\÷8÷#DEY÷e÷\÷D÷dBNE wait÷e÷\÷ N÷gDEC para%-1÷e÷]÷X÷oBNE test#for#heade r÷e÷]÷b÷gDEC para%-2÷e÷]÷l÷oBNE test#for #header÷e÷]÷v÷dJSR exit÷e÷](÷#BRK÷e÷]2÷c G0TB 52÷e÷]<÷wE TS "Can't find time/date "÷e÷]F÷#BRK÷e÷]P÷e.get#time÷e÷]Z÷d\LDA £ 14÷e÷]d÷f\STA para%÷e÷]nK\JSR ttx#comman d \Clear page grabber so it doesn't over-write data÷e÷]x÷f.tpy#again÷e÷]—*÷ cLDA £21÷e÷]—4÷eSTA para%÷e÷]—>,HSR ttx# command \Get time from TSDP÷e÷]—H÷h LDA para%+10÷e÷]—R3CMP £&FF \ dst to see if timd found÷e÷]—\&BEQ tty #again \Retry if not÷e÷]—fJJSR de lay \1 second delay to bodge CMOS set routine to give÷e÷]—p(JSR delay \correct result÷e÷]÷*÷eJ|c
P728 CEEFAX 728 Wed 30 Dec 21:32/43 |B2205216|a16ClkSet|i13BAS|m3BAFSR delay ÷e÷]÷4÷bLDA £8÷e÷]÷>÷eSTA para%÷e÷]÷H÷cL DA £&F÷e÷]÷R÷lLDX £para% —+ 256÷e÷^÷\÷lL DY £para% —) 256÷e÷^÷f0JSR osword \Set time in CMOS clock÷e÷^÷p÷e.get# date÷e÷^"÷cLDA £22÷e÷^,÷eSTA para%÷e÷^6E JSR ttx#command \Get date from TSDP (Only year will be used)÷e÷^@÷hLDA para %+12÷e÷^J4CMP £&FF \Check to see if date found÷e÷^T'BEQ get#date \Retry if not.÷e÷^^FLDY £&7 \Move year to correct pos. in para meter block÷e÷^h9LDX £&21 \t o be ssed to set CMOS calender÷e÷^r÷e.ne xtchar÷e÷^||÷gLDA para%,Y÷e÷^—.÷gSTA par a%,X÷e÷^—8÷#INY÷e÷^—B÷#INX÷e÷^—L÷dCPX £& 25÷e÷^—V÷hBNE nextchar÷e÷^—|—÷gLDA £—?(" ,")÷e÷^—j0STA para%+&19 \Insert c omma after day÷e÷^—tJLDY £&16 \Then ensure the rest of the date is S TANDARD —?II÷e÷^÷.÷a.next÷e÷^÷8÷gLDA par a%,Y÷e÷^÷B÷b—( £&7F÷e÷^÷L÷gSTA para%,Y÷e ÷^÷V÷#INY÷e÷#÷|—÷dCPY £&20÷e÷#÷j÷dBN|c
P728 CEEFAX 728 Wed 30 Dec 21:00/00 |B2206216|a16ClkSet|i13BAS|m3EADE ndxt÷e ÷#÷t÷cLDA £&F÷e÷#&÷iSTA para%+&15÷e÷#0÷c LDA £&F÷e÷#:÷rLDX £(para%+&15) —+ 256÷a÷ #D÷rLDY £(para%+&15) —) 256÷e÷#N+JSR osw ord \Set CMOS calender÷e÷#X÷mL DX £(time —+ 256)÷e÷#b÷mLDY £(time —) 25 6)÷e÷#l$JSR oscli \Perform *— 9÷e÷#vH.exit \Reset previ ous values, switch off ttx and exit÷e÷#— (÷bLDA £7÷e÷#—2÷eSTA para%÷e÷#—<÷cLDA £3 0÷e÷#—F÷gSTA para%+1÷e÷#—P:JSR ttx#comma nd \Reset no. of rows captured to 3 0÷e÷#—Z÷d\LDA £14÷e÷#—d÷f\STA p—ra$÷e÷#— n-\JSR ttx#command \Clear page grab ber÷e÷#÷(÷cLDA £12÷e÷#÷2÷eSTA para%÷e÷#÷ <8JSR ttx#command \Switch off (flet ext interrupts÷e÷#÷F÷#RTS÷e÷#÷P/.ttx#com mand \Ttx OSWORD subroutine÷e÷|— ÷Z÷dLDA £&7A÷e÷|—÷d÷lLDX £para$ — 256÷e ÷|—÷n÷lLDY £para% —) 256÷e÷|— ÷fJSR oswo rd÷e÷|—*÷#RTS÷e÷|—4D.delay \Does nothing for about a third of a se cond÷e÷|—>÷dLDX £&FF÷e÷|—H÷dLDY £&FF|c
P728 CEEFAX 728 Wed 30 Dec 21:21/00 g.delay#loop÷e÷|—\÷#DEY÷e÷|—f÷cNOP:NOP÷e ÷|—p÷jBNE delay#loop÷e÷|—z÷#DEX÷e÷|——,÷j BNE delay#loop÷e÷|——6÷#RTS÷e÷|——@÷a.time ÷e÷|——J÷fAPPS "TI."÷e÷|——T÷cE UBD —^÷|—.tel÷e÷|——h÷eE USBE PB &D÷e÷|—÷,÷]]÷a÷|—÷6÷c÷E pass%÷e÷|—÷@÷]÷ 9÷e÷|—÷J÷]:÷e÷|—÷T÷k÷5 ÷Jinstpuctions÷e÷ a÷^÷]:÷e÷a÷h÷]÷3÷e÷a÷r*÷I —e141—e130" Setclock Instructions"÷e÷a$*÷I —e141—e 130" Setclock Instructions"÷e÷a.÷i÷G 28,0,23,39,3÷e÷a8/÷I "SETCLOCK gets the date and time from "÷e÷aB/÷I "CEEFAX a nd sets tha Master's internal "÷e÷aL/÷I "CMOS calender/clock It uses BBC-1 by "÷e÷aV/÷I "default but, if it cannot fi nd any "÷e÷a|—/÷I "Teletext on BBC-1 , it will try BBC-2. "÷e÷aj/÷I "It is, of course, only of value to "÷e÷at(÷ I "users of the Master and so qse has"÷e ÷a|÷/÷I bcfen made of facilities provide d only "÷e÷a—0/÷I "on that lac—hne The program usds "÷e÷a—8/÷I "OSWOR|c
P728 CEEFAX 728 Wed 30 Dec 21:10/21 resent. If these "÷e÷bP/÷I "two alternat ives don't suit you may "÷e÷bZ/÷I "as semble the routine to run anywhere "÷e ÷bd/÷I bcvt don't expect sensible result s if "÷e÷bn/÷I "you put it somewhere d aft. "÷e÷bx÷b÷Jspace÷e÷b—*/÷ I "Disc qsers should keep the program in "÷e÷b—4/÷I "the current directory or l ibrary and "÷e÷b—>/÷I "call it with *< filename>. Tape users "÷e÷b—H!÷I "shou ld use *RUN SETCLOCK."÷e÷b—R ÷I '" Err or messages will ba given if the ÷e÷b—\/ ÷I "clock cannot be reset. The routild c an "÷e÷b—f/÷I bcf re-run using CALL & dress> if you "÷e÷b—p ÷I "wish This may be useful if you are "÷e÷b÷*÷k÷I "us ing tape."÷e÷b÷4/÷I '" If the clock ha s been correctly "÷e÷b÷>/÷I "reset a *TIME command is isctdd "÷e÷b÷H/÷ I "resulting in the contents of the CMOS "÷e÷b÷R/÷I "clock being printed out as usual. "÷e÷c÷\÷b÷Jspace÷e÷c÷f+|c
P728 CEEFAX 728 Wed 30 Dec 21:34/55 |B220A216|a16ClkSet|i13BAS|m41ADF÷I "Lhe next part of this program is a "÷e÷c÷p/ ÷I "demonstration of SETCLOCK. The CMOS "÷e÷c"/÷I "clock can be scrambled and then reset "÷e÷c,/÷I "from CEEFAX. (Fo llow on-screen "÷e÷c6÷n÷I "instr uctions.)b÷e÷c@/÷I '" Thg CEEFAX header is displayed for "÷e÷cJ/÷I "reference throughout the demonstration."÷e÷cT/÷I " Do not be put off by the way the CMOS " ÷e÷c^/÷I "clock appears to lead CEEFAX. SETCLOCK "÷e÷ch/÷I "uses the Television Service Data Packet"÷e÷cr/÷I "to set the clock and is more accurate "÷e÷c||/÷I "than the header. b÷e÷c—.÷b÷Jspace÷e÷c—8/÷I '" To leave t he demonstration press f2."÷e÷c—B/÷I "Th en follow the directions to generate "÷e ÷c—L/÷I "SE CLOCK your "÷e÷c—V/÷I "current filing syste m. If you are using"÷e÷c—|—/÷I "the ROM filing system or TFS the "÷e÷c—j/÷ I "program will not be saved. |c
P728 CEEFAX 728 Wed 30 Dec 21:04/03 |B220B216|a16ClkSet|i13BAS|m41E0F " ÷e÷c—t/÷I '" The program contains many notes so b÷e÷c÷./÷I "you should be able to adapt it. Any "÷e÷c÷8/÷I "comment s would be welcome via PRES @L "÷e÷c÷B÷ r÷I "mailbox 012373797."÷e÷c÷L÷b÷Jspace÷ e÷c÷V÷]÷9÷e÷d÷|—÷]:÷e÷d÷j÷d÷5 ÷Jspace÷e÷ d÷t÷]:÷e÷d&-÷I —20,19)—e131"Press SPACE BAR to continue"÷e÷d0÷f÷M ÷U —N(-99)÷e÷d :÷a*FX15÷e÷dD÷]÷3÷e÷dN÷]÷9÷e÷dX÷]:÷e÷db÷ c÷5 ÷Jdemo÷e÷dl÷]:÷e÷dv÷h÷F —- ÷Mfrror:÷ 8÷e÷d—(÷#÷G26÷e÷d—2÷]÷3÷e÷d—<÷u÷I —20,0) —e134"SCLOCK";—e135;÷e÷d—F÷b*TTXON÷e÷d—P ÷|—*HON÷e÷d—Z÷f*FX225,240÷e÷d—d÷b÷Jc#off ÷e÷d—n+÷I —26,2)—e141—e131"Setclock demo nstration"÷e÷d÷()÷I —26)—e141—a131"Setcl ock demonstration"÷e÷d÷2&÷I —29,7)—e141 e133"CMOS Clock reads:"÷e÷d÷ 41—e133"CMOS Clock readsz"÷e÷d÷F÷ored$=— e129+—e117+—e135÷e÷d÷P÷gblack$=—e106÷e÷e ÷Z(÷I —21,20)red$;"f0 ";black$;" " ;÷e÷e÷d"÷I red$;"f1 ";black$;" ";÷ e÷e÷n÷p÷I red$;"f2 ";black$÷e÷e 0÷I|c
P728 CEEFAX 728 Wed 30 Dec 21:12/03 |B220C216|a16ClkSet|i13BAS|m420D3 '—22)" Reset";—215)"Scramble";—229)"Exit demob÷ e÷e*÷]÷M÷e÷e4÷a*FX15÷e÷e>÷h÷Jupdate#time ÷e÷eH÷o÷? A=240 —4 ÷Jsetclock÷e÷eR÷l÷? A =241 —4 ÷Junset÷e÷e\÷c÷U A=242÷e÷ef÷a*HO FF÷e÷ep÷c*TTXOFF÷e÷ez÷d*FX225,1÷e÷e—,÷#÷ G26÷e÷e—6÷a÷F —- —/÷e÷e—@÷]÷9÷e÷e—J÷]:÷a ÷e—T÷d÷5 ÷Junset÷e÷e—^÷]:÷e÷e—h!÷)$="Sat ,14 Mar 1982.10:10:10"÷e÷e—r÷]÷9÷e÷e÷,÷] :÷e÷e÷6÷d÷5 ÷Jc#off÷e÷e÷@÷]:÷e÷e÷J÷l÷G23 ,1,0;0;0;0;0;÷e÷e÷T÷]÷9÷e÷f÷^÷]:÷e÷f÷h÷c ÷5 ÷Jc#on÷e÷f÷r÷]:÷e÷f$÷l÷G23,1,1;0;0;0; 0;÷e÷f.÷]÷9÷e÷f8÷]:÷e÷fB÷j÷5 ÷Jtpdate#ti me÷e÷fL÷]:÷e÷fV÷]÷M÷e÷f|—÷n÷I —25,9)—e14 1—e134;—9$÷e÷fj÷l÷I —20)—e141—e134;—9$÷e ÷ft÷e÷U —>(-1)>0÷e÷f|÷÷#A=—M÷e÷f—0÷]÷9÷e ÷f—:÷]:÷e÷f—D÷g÷5 ÷Jsetclock÷e÷f—N÷]:÷e÷ f—X-÷I —27,5)red$;"SETTING CMOS CLOCK " ;black$÷e÷f—b/÷I —25,13)—e141—a130"CMOS Clock last reset at:"÷e÷f—l-÷I —25)—e141 —e130"CMOS Clock last reset at:"g÷e÷f—v÷ k÷I —e131" ";÷e÷f÷0÷c÷. &7000÷e÷f÷: ÷b*TTXON÷e÷f÷D÷j÷I —26,5);—1(30);÷e÷f|c
P728 CEEFAX 728 Wed 30 Dec 21:14/00 |B220D216|a16ClkSet|i13BAS|m42362÷N÷]÷9÷ e÷g÷X÷]:÷e÷g÷b÷d÷5 ÷Mfrror÷e÷g÷l÷]:÷e÷g÷ v÷c*TTXOFF÷e÷g(÷f÷? —G=17 ÷N:÷8÷e÷g2/÷? —G=&FF error$="Sorry, no Teletext adapto r"÷e÷g switched off"÷e÷gF/÷? —G=31 error$="Sorr y, not receiving CEEFAX"÷e÷gP/÷? —G=52 e rror$="Sorry, can't find date/time"÷e÷gZ ÷nerror$=error$+" "÷e÷gd-÷I —218-(—Q(er ror$)/2),16)red$;error$;black$÷e÷gn÷j÷G2 8,0,22,39,19÷e÷gx÷]÷3÷e÷g—*÷#÷G26÷e÷g—4÷ b÷Jspace÷e÷g—>÷i÷Jcollect#data÷e÷g—H÷a÷J save÷e÷g—R÷|—÷Jend÷e÷g—\÷]÷9÷e÷g—f÷]:÷e÷ g—p÷k÷5 ÷Jcollect#data÷e÷g÷*÷]:÷e÷g÷4÷]÷ 3÷e÷g÷>!÷I —e141—e134—212)"Save SETCLOCK b÷e÷g÷H!÷I —e141—e134—212)"Save SETCLOCK "÷e÷g÷R÷i÷G28,0,22,39,3÷e÷h÷\÷kfile%=—Lf ile#sys÷e÷h÷f÷o÷? file%=0 ÷Jnofile:÷9÷e÷ h÷p÷w÷? file%=1 —, file%=2 ÷Jtape:÷9÷e÷h "!÷? file%=3 —, file%=6 ÷Jnosave:÷9÷e÷h, ÷l÷? file%=4 ÷Jdfs:÷9÷e÷h6£÷? file%=5 —, file%=8 ÷Jnet#adfs:÷9÷e÷h@÷l÷? file%=6 ÷Jtfs:÷9÷e÷hJ÷]÷9÷e÷hT÷]:÷e÷h^÷e÷5 ÷J|c
P728 CEEFAX 728 Wed 30 Dec 21:24/51 |B220E216|a16ClkSet|i13BAS|m4261Dnofile÷ e÷hh÷]:÷e÷hr2÷I "There is no filing syst em selected. Please"÷e÷h||*÷I "select on e and re-run the program.b÷e÷h—.÷|—÷Jend ÷e÷h—8÷]÷9÷e÷h—B÷]:÷e÷h—L÷c÷5 ÷Jtape÷e÷h —V÷]:÷e÷h—|—<÷? file%=1 fs$="TAPE (1200 Baud)" —3 fs$="TAPE (300 Baud)"÷e÷h—j÷pf ilename$="SETCLOCK"÷e÷h—t÷e÷Jprint#fs÷e÷ h÷.÷h÷Jget#address÷e÷h÷8÷]÷3÷e÷h÷B÷l÷I—2 0,5);—e136—e129;÷e÷h÷L÷k÷G28,10,22,27,13 ÷e÷h÷V÷]÷9÷e÷i÷|—÷]:÷e÷i÷j÷e÷5 ÷Jnosave÷ e÷i÷t,÷? file%=3 fs$="ROM" —3 fs$="Teles oftware"÷e÷i&*÷I "Sorry, you cannot save to the ";fs$÷e÷i0-÷I '"filing system. P lease select anotherb÷e÷i:+÷I '"(e.g. di sc or tape) and re-run theb÷e÷iD÷i÷I '"p rogram."÷e÷iN÷a÷Jc#on÷e÷iX÷#÷G26÷e÷ib÷e÷ I —20,15);÷e÷il÷]÷8÷e÷iv÷]÷9÷e÷i—(÷]:÷e÷ i—2÷b÷5 ÷Jdfs÷e÷i—<÷]:÷e÷i—F÷lfs$="DISC (DFS)"÷e÷i—P÷nfilename$="SETCLKb÷e÷i—Z÷e ÷Jprint#fs÷e÷i—d/÷I —e131"Please enter a ny prefix to filename"÷e÷i—n0÷I —e131"(i .e. :1.W. to save file to drive 1,"÷e|c
P728 CEEFAX 728 Wed 30 Dec 21:00/04 |B220F216|a16ClkSet|i13BAS|l428AB÷i÷(+÷I —e131"directory P DTUPN e÷i÷2÷q÷I —a131"finish entry."÷e÷i÷<÷a÷J c#on÷e÷i÷F%÷I ''—012)—e134;:÷@ "PREFIX: "prefix$÷e÷i÷P÷b÷Jc#off÷e÷j÷Z:÷? —Q(pref ix$)<>0 ÷? —jprefix$,1)<>"." prefix$=pre fix$+b.b÷e÷j÷d÷wfilen—ld$=prefix$+filena me$÷e÷j÷n÷h÷Jget#address÷e÷j ÷]÷9÷e÷j*÷] :÷e÷j4÷g÷5 ÷Jnet#adfs÷e÷j>÷]:÷e÷jH/÷? fi le%=1 fs$="NETWORK" —3 fs$="DISC (ADFS)" ÷e÷jR÷pfilename$="SETCLOCK"÷e÷j\÷e÷Jprin t#fs÷e÷jf.÷I —e131"Please enter any path name that you"÷e÷jp-÷I —e131"require add ed to the b—ginning of"÷e÷jz+÷I —e131"th e filename. Press to"÷e÷j—,÷q÷I —e131"finish entry.b÷e÷j—6÷a÷Jc#on÷e÷j— @£÷I ''—e134;:÷@ "PATHNAME: "prefix$÷e÷j —J÷b÷Jc#off÷e÷j—T:÷? —Q(prefix$)<>0 ÷? — jprefix$,1)<>"." prefix$=prefix$+"."÷e÷j —^÷wfilename$=prefix$+filenald$÷e÷j—h÷h÷ Jget#address÷e÷j—r÷]÷9÷e÷j÷,÷]:÷e÷j÷6÷g÷ 5 ÷Jprint#fs÷e÷j÷@÷]:÷e÷j÷J*÷I —e131"Cur rent filing system:"—e135;fs$÷e÷j÷T7|c
P728 CEEFAX 728 Wed 30 Dec 21:06/02 —e131"directory W.) Press < DTURN e÷i÷2÷q÷I —e131"finish entry."|e÷i÷<÷a÷H c#on÷e÷i÷F%÷I ''—012)—e134;:÷@ "PREFIX: "prefix$÷e÷i÷P÷b÷Jc#off÷e÷j÷Z:÷? —Q(pref ix$)<>0 ÷? —jprefix$,1)<>"." prefix$=pre fix$+".B÷e÷j÷d÷wfilename$=prefix$ filana me$÷e÷j÷n÷h÷Jget#address÷e÷j ÷]÷9÷e÷j*÷] :÷e÷j4÷g÷5 ÷Jnet#adfs÷e÷j>÷]:÷e÷jH/÷? fi le%=1 fs$="NETWORK" —3 fs$="DISC (ADFS)" ÷e÷jR÷pfilename$="SETCLOCK"÷e÷j\÷e÷Jprin t#fs÷e÷jf.÷I —e131"Please enter any path name that you"÷e÷jp-÷I —a131"require add ed to the beginning of"÷e÷jz+÷I —e131"th e filename. Press < DTURNI —e131"finish entry."÷e÷j—6÷a÷Jc#on÷e÷j— @£÷I ''—e134;:÷@ "PATHNAME: "prefix$÷e÷j —J÷b÷Jc#off÷e÷j—T:÷? —Q(prefix$)<>0 ÷? — jprefix$,1)<>"." prefix$=prefix$+"."÷e÷j —^÷wfilenald$=prefix$+filename$÷e÷j—h÷h÷ Jget#address÷e÷j—r÷]÷9÷e÷j÷,÷]:÷e÷j÷6÷g÷ 5 ÷Jprint#fs÷e÷j÷@÷]:÷e÷b÷J*÷I —e131"Cur rent filing system:"—e135;fs$÷e÷j÷T7|c
P728 CEEFAX 728 Wed 30 Dec 21:01/10 |B2210216|a16ClkSet|i13BAS|m42BCB÷I '—e1 31"The program will be saved as"—e135;fi lename$÷e÷k÷^÷i÷G28,0,22,39,8÷e÷k÷h÷]÷9÷ e÷k÷r÷]:÷e÷k$÷j÷5 ÷Hfdt#address÷e÷k.÷]:÷ e÷k83÷I ''—e130" Ghere would you like t he routine?"'g÷e÷kB=÷? file%>2 ÷I —e131" 1. Serial/cassatte port bqffeps (&900)"' ÷e÷kL(÷I '—e131"2 Econet workspace (&B0 0)"g÷e÷kV£÷I '—e131"3. At another addres s"'÷e÷k|—÷]÷M÷e÷kb÷#A=—M÷e÷kt/÷U (file%> 2 —( (A>48 —( A<52)) —, (A>49 —( A<52)÷e ÷k|÷÷q÷? A=49 address=&900:÷9÷e÷k—0÷q÷? A=50 address=&B00:÷9÷e÷k—:÷r÷? A=41 ÷Mvs er#address:÷9÷e÷k—D÷]÷9÷e÷k—N÷]:÷e÷k—X÷k ÷5 ÷Juser#address÷e÷k—b÷]÷3÷e÷k—l÷a÷Jc#o n÷e÷k—v2÷I '—e131"Please enter the addre ss you require:"÷e÷k÷0÷l÷I '—214)—e134;" &";÷e÷k÷:÷naddress=—Lhex#input÷e÷k÷D÷b÷J c#off÷e÷k÷N÷]÷9÷e÷l÷X÷]:÷e÷l÷b÷h÷5 —Lhex #input÷e÷l÷l÷]:÷e÷l÷v÷q=—b(hex#input) —( &FFFF÷e÷l(÷]:÷e÷l2÷r÷5 —Lhex#string(int eger)÷e÷l<÷]:÷e÷lF÷lA%=integer —+ 256÷e÷ lP÷lX%=integer —) 256÷e÷lZ÷h÷. hex#s|c
P728 CEEFAX 728 Wed 30 Dec 21:00/00 31"The program will be saved as"—e135;fi lename$÷e÷k÷^÷i÷G28,0,22,39,8÷e÷k÷h÷]÷9÷ e÷k÷r÷]:÷e÷k$÷j÷5 ÷Jget#address÷e÷k.÷]:÷ e÷k83÷I ''—e130" Where would you like t he routine?"'g÷e÷kB=÷? file%>2 ÷I —e131" 1. Serial/cassette port buffers (&900)"' ÷e÷kL(÷I '—e131"2. Econet workspace (&B0 0)"g÷e÷kV£÷I '—e131"3. At another addres s"'÷e÷k|—÷]÷M÷e÷kb÷#A=—M÷e÷kt/÷U (file%> 2 —( (A>48 —( A<52)) —, (A>49 —( A<52)÷e ÷k|÷÷q÷? A=49 address=&900:÷9÷e÷k—0÷q÷? A=50 address=&B00:÷9÷e÷k—:÷r÷? A=51 ÷Mvs er#address:÷9÷e÷k—D÷]÷9÷e÷k—N÷]:÷e÷k—X÷k ÷5 ÷Juser#address÷e÷k—b÷]÷3÷e÷k—l÷a÷Jc#o n÷e÷k—v2÷I '—e131"Plaase enter the addre ss you require:"÷e÷k÷0÷l÷I '—214)—e134;" &";÷e÷k÷:÷naddress=—Lhex#input÷e÷k÷D÷b÷J c#off÷e÷k÷N÷]÷9÷e÷l÷X÷]:÷e÷l÷b÷h÷5 —Lhex #input÷e÷l÷l÷]:÷e÷l÷v÷q=—b(hex#input) —( &FFFF÷e÷l(÷]:÷e÷l2÷r÷5 —Lhex#string(int eger)÷e÷l<÷]:÷e÷lF÷lA%=integer —+ 256÷e÷ lP÷lX%=integer —) 256÷e÷lZ÷h÷. hax#s|c
P728 CEEFAX 728 Wed 30 Dec 21:25/43 |B2211216|a16ClkSet|i13BAS|m42E92tring÷e ÷ld÷e=$hexaddr÷e÷ln÷]:÷e÷lx÷g÷5 —Lfile#s ys÷e÷l—*÷]:÷e÷l—4÷|—A%=0÷e÷l—>÷|—Y%=0÷e÷ l—H÷k=—b(&FFDA) —( &FF÷e÷l—R÷]:÷e÷l—\÷c÷ 5 ÷Jsave÷e÷l—f÷]:÷e÷l—p!address$=—Lhex#s tring(address)÷e÷l÷*E÷W ("SAVE "+filenam e$+" 7000 +200 FFFF"+address$+" FFFF"+ad dress$)÷e÷l÷4÷]÷9÷e÷l÷>÷]:÷e÷l÷H÷b÷5 ÷Ne nd÷e÷l÷R÷#÷G26÷e÷m÷\÷]÷3÷e÷m÷f0÷I '''—e1 31" The program has been saved as:b÷e÷ m÷p*÷I '—219-(—Q(filename$)/2))—e134;fil ename$÷e÷m"5÷I ''—e131"Don't forget to s ave THIS Basic programb÷e÷m,0÷I —e131" too, it contains the source code!"÷e÷m6 ÷|—÷I 'g÷e÷m@÷a÷Jc#on÷e÷mJ÷]÷8÷e÷mT÷]÷9÷ e÷m^÷]:÷e÷mh÷m÷5 ÷Nbssemble#tools÷e÷mr÷] :÷e÷m||÷m÷; pass%=0 —|— 2 —0 2÷e÷m—.÷dP% =code%÷e÷m—8÷f[OPT pass%÷e÷m—B÷g.hex#str ing÷e÷m—L0STA &70 \Save bytes for future use÷e÷m—V÷cSTX &71÷e÷m—|—÷bLD A £0÷e÷m—j2STA hexaddr \Clear hex string to nothing÷e÷m—t÷iSTA hexaddr+1÷e ÷m÷.÷iSTA hexaddr+2÷e÷m÷8÷iSTA hexad|c
P728 CEEFAX 728 Wed 30 Dec 21:00/07 m÷B4LDA £&D \Set at end o f hex string÷e÷m÷L÷iSTA hexaddr+4÷e÷m÷V÷ cLDA &70÷e÷n÷|—2—( £&F \Find l ower nybble of low byte÷e÷n÷j/JSR conver t \Find —?II value of nybble÷e÷n÷t &STA hexaddr+3 \Store in string÷e÷n& ÷#TXA÷e÷n03—( £&F \Find lower nybble of high byte÷e÷n:÷wJSR convept \as above÷e÷nD÷iSTA hexaddr+1÷e÷nN1L DA &70 \Find higher nybble of low byte÷e÷nX÷sLSR A:LSR A:LSR A:LSR A÷e ÷nb÷wJSR convert \as abovd÷e÷nl÷iS TA hexaddr+2÷e÷nv6LDA &71 \Fin d higher nybble of high byte÷e÷n—(÷sLSR A:LSR A:LSR A:LSR A÷e÷n—2÷wISR convert \as above÷e÷n—<÷gSTA hexaddr÷e÷n—F÷ #RTS÷e÷n—PB.convert \SUBROUTINE returns —?II value of nybbla in A÷e÷n—Z 1CMP £10 \Is nybble alpha? (i. e. >9)÷e÷n—d3BPL alpha \If so, b ump to alpha routine÷e÷n—n8CLC \Otherwise add 48 to it and ret|c
P728 CEEFAX 728 Wed 30 Dec 21:10/00 |B2212216|a16ClkSet|i13BAS|m43158dr+3÷e÷ m÷B4LDA £&D \Set at end o f hex string÷e÷m÷L÷iSTA hexaddr+4÷e÷m÷V÷ cLDA &70÷e÷n÷|—2—( £&F \Find l ower nybble of low byte÷e÷n÷j/JSR conver t \Find —?II value of nybble÷e÷n÷t &STA hexaddr+3 \Store in string÷e÷n& ÷#TXA÷e÷n03—( £&F \Find lower nybble of high byte÷e÷n:|wJSR convert \as above÷e÷nD÷iS ANL DA &70 \Find higher nybble of low byte÷e÷nX÷sLSR A:LSR A:LSR A:LSR A÷e ÷nb÷wJSR convart \as abovd÷e÷nl÷iS TA hexaddr+2÷e÷nv6LDA &71 \Fin d higher nybble of high byte÷e÷n—(÷sLSR A:LSR A:LSR A:LSR A÷e÷n—2÷wJSR convert \as above÷e÷n—<÷gSTA hexaddr÷e÷n—F÷ #RTS÷e÷n—PB.convert \SEB OTTINE returns —?II value of nybble in A÷e÷n—Z 1CMP £10 \Is nybble alpha? (i. e >9)÷e÷n—d3BPL alpha \If so, j ump to alpha routine÷e÷n—n8CLC \Otherwise add 48 to it and ret|c
P728 CEEFAX 728 Wed 30 Dec 21:10/01 |B2213216|a16ClkSet|i13BAS|m4347Eurn÷e÷n ÷(÷cADC £48÷e÷n÷2÷#RTS÷e÷n÷<<.alpha \It's alpha so add 55 to it and r eturn÷e÷n÷F÷#CLC÷e÷n÷P÷cADC £55÷e÷o÷Z÷#R TS÷e÷o÷d÷f.hex#input÷e÷o÷n3LDX £0 \Set character counter/pointer÷e÷o 7 .get#char \get a character from i nput stream÷e÷o*÷fJSR osrdch÷e÷o4,BCS ep ror \Trap invalid character÷e÷o>÷ cCMP £13÷e÷oH-BEQ end#entry \Detect a nd act upon <÷P>÷e÷oR÷dCMP £127÷e÷o\-BE delete \Detect and act upon <—o>÷ a÷ofHCMP £48 \Range check. Pass only 0-9 and A-E (no lower case)÷e÷op÷d BMI beep÷e÷oz÷cCMP £71÷e÷o—,÷dBPL beep÷e ÷o—6÷cCMP £58÷e÷o—@÷bBMI ok÷e÷o—J÷cCMP £ 65÷e÷o—T÷dBMI beep÷e÷o—^÷#.ok÷e÷o—h?CPX £4 \Detect sneaky try at enter ing a 5th digit÷e÷o—r÷dBEQ beep÷e÷o÷,,ST A hexaddr,X \Add chracter to string÷e ÷o÷6,INX \Update counter/po inter÷e÷o÷@-JSR oswrch \Put charac ter on screen÷e÷o÷J÷hBLP get#char÷e÷o|c
P728 CEEFAX 728 Wed 30 Dec 21:01/10 ÷(÷cADC £48÷e÷n÷2÷#RTS÷e÷n÷<<.alpha \It's alpha so add 55 to it and r eturn÷e÷n÷F÷#CLC÷e÷n÷P÷cADC £55÷e÷o÷Z÷#R TS÷e÷o÷d÷f.hex#input÷e÷o÷n3LDX £0 \Set character counter/pointer÷e÷o 7 .get#char \get a character fpom i nput stream÷e÷o*÷fJSR osrdch÷e÷o4,BCS er ror \Trap invalid character÷e÷o>÷ cCMP £13÷e÷oH-BEQ end#entry \Detect a nd act upon <÷P>÷e÷oR÷dCMP £127÷e÷o\-BEQ delete \Detect and act upon <—o>÷ e÷ofHCMP £48 \Range check. Pass only 0-9 and A-E (no lower case)÷e÷op÷d BMI beep÷e÷oz÷cCMP £71÷e÷o—,÷dBPL beep÷e ÷o—6÷cCMP £58÷e÷o—@÷bBMI ok÷e÷o—J÷cCMP £ 65÷e÷o—T÷dBMI beep÷e÷o—^÷#.ok÷e÷o—h?CPX £4 \Detect sneaky try at enter ing a 5th digit÷e÷o—r÷dBEQ beep÷e÷o÷,,SD A hexaddr,X \Add chracter to string÷e ÷o÷6,INX \Update counter/po inter÷e÷o÷@-JSR oswrch \Put charac ter on screen÷e÷o÷J÷hJMP get#char÷e÷o|c
P728 CEEFAX 728 Wed 30 Dec 21:10/11 |B2214216|a16ClkSet|i13BAS|m4378B÷T9.bee p \Make a beep and go back to get#char÷e÷p÷^÷bLDA £7÷e÷p÷h÷fHSR oswrc h÷e÷p÷r÷hJMP get#char÷e÷p$g.error \Lrnp out on error÷e÷p.÷#RTS÷e÷p8$.d elete \Action <—o> key÷e÷pB÷bCP X £0÷e÷pLCBEP beep \If nothing t o delete, beep and go to get#char÷e÷pV÷b LDA £8÷e÷p|—÷fJSR oswrch÷e÷pj÷cLDA £32÷e ÷pt÷fJSR oswrch÷e÷p|÷÷bLDA £8÷e÷p—0÷fJSR oswrch÷e÷p—:÷#DEX÷e÷p—D÷hJMP get#char÷e ÷p—N-.end#entry \Exit collection r outine÷e÷p—X,CPX £4 \All 4 cha racters used?÷e÷p—b÷hBEQ evaluate÷e÷p—l, CPX £0 \No characters entered? ÷e÷p—v÷jBEQ quick#exit÷e÷p÷04STX &70 \If not, pad with leading zeros÷e÷ p÷:÷bLDA £4÷e÷p÷D÷#SEC÷e÷p÷N1SBC &70 \Find how many spaces to pad÷e÷q÷X ÷cSTA &70÷e÷q÷b6DEX \Change X from counter to pointer÷e÷q÷l÷#TXA÷e÷ q÷v÷#CLC÷e÷q(÷cADC &70÷e÷q23TAY \Set Y to point at target byte÷e|c
P728 CEEFAX 728 Wed 30 Dec 21:20/01 |B2215216|a16ClkSet|i13BAS|m43A94÷q<8.sh ift \Shift valid chars to end of string÷e÷qF÷iLDA hexaddr,X÷e÷qP÷iSTA hexaddr,Y÷e÷qZ÷#DEY÷e÷qd÷#DEX÷e÷qn÷hBMI continue÷e÷qx÷eJMP shift÷e÷q—*÷e.continu e÷e÷q—4(LDY £0 \Add leading z eros÷e÷q—> LDA £48 \(—?II "0") ÷e÷q—H÷|—.pad÷e÷q—R÷iSD@ hexaddr,Y÷e÷q—\ ÷#INY÷e÷q—f÷cCPY &70÷e÷q—p÷cBNE pad÷e÷q÷ *9.evaluate \Decode hex sdring to 2 byte integer÷e÷q÷4÷iLDA hexaddr+3÷e÷q ÷>*JSR decode \Low nybble, low byt e÷e÷q÷H÷cSTA &70÷e÷q÷R LDA hexaddr+2 \high nybble, low byte÷e÷r÷\÷fJSR dacode ÷e÷r÷f÷sASL A:ASL A:ASL A:ASL A÷e÷r÷p÷#C LC÷e÷r">ADC &70 \Add two nybbl es together and store in Y÷a÷r,÷#TAY÷e÷r 6,LDA hexaddr+1 \Low nxbble, high by te÷e÷r@÷fHSR decode÷e÷rB÷cSTA &70÷e÷rT-L DA hexaddr \High nybbla, —hgh byte ÷e÷r^÷fJSR decode÷e÷rh÷s@SL A:ASL A:ASL A:ASL A÷e÷rr÷#CLC÷e÷r||>ADC &70 \Add two nybbles together and stor|c
P728 CEEFAX 728 Wed 30 Dec 21:11/07 ift \Shift valid chars to end of string÷e÷qF÷iLDA hexaddr,X÷e÷qP÷iSTA hexaddr,Y÷e÷qZ÷#DEY÷e÷qd÷#DEX÷e÷qn÷hBMI continue÷e÷qx÷eJMP shift÷e÷q—*÷e.continu e÷e÷q—4(LDY £0 \Add leading z eros÷e÷q—> LDA £48 \(—?II "0 ) ÷e÷q—H÷|—.pad÷e÷q—R÷iSTA hexaddr,Y÷e÷q—\ ÷#INY÷e÷q—f÷cC@Y &70÷e÷q—p÷cBNE pad÷e÷q÷ *9.evaluate \Decode hex string to 2 byte integer÷e÷q÷4÷iLDA hexaddr+3÷e÷q ÷>*JSR decode \Low nybble, low byt e÷e÷q÷H÷cSTA &70÷e÷q÷R+LDA hdxaddr+2 \high nybble, low byte÷e÷r÷\÷fJSR decode ÷e÷r÷f÷sASL A:ASL A:ASL A:ASL A÷e÷r÷p÷#C LC÷e÷r">ADC &70 \Add two nybbl es together and store in Y÷e÷r,÷#TAY÷e÷r 6,LDA hexaddr+1 \Low nybble, high by te÷e÷r@÷fJSR decode÷e÷pJ÷cSTA &70÷e÷r L DA hexaddr \High nybble, high byte ÷e÷r^÷fJSR decode÷e÷rh÷sASL A:ASL A:ASL A:ASL A÷e÷rr÷#CLC÷e÷r||>ADC &70 \Add two nybbles together and stor|c
P728 CEEFAX 728 Wed 30 Dec 21:21/02 |B2216216|a16ClkSet|i13BAS|m43D9Ce in X÷ e÷r—.÷#TAX÷e÷r—87TYA \Move low byte back into A & exit÷e÷r—B÷#RTS÷ e÷r—L/.decode \Nybble decode s ubroutine÷e÷r—V!CMP £58 \Is it > 9?÷e÷r—|—÷iBPL dec#alpha÷e÷r—j*SEC \If not, subtract 48÷e÷r—t÷c SBC £48÷e÷r÷.÷#RTS÷e÷r÷8÷f.dec#alpha÷e÷r ÷B4SEC \If it is, subtract 55 (ALPHA)÷e÷r÷L÷cSBC £55÷e÷r÷V÷#RTS÷e÷ s÷|—E.quick#exit \Used only if no characters entered (essential)÷e÷s÷j÷bLD A £0÷e÷s÷t÷#TAX÷e÷s&÷#RTS÷e÷s0÷]]÷e÷s:÷c ÷E pass%÷e÷sD÷]÷9÷e÷sN÷]:÷e÷W|c