Home » CEEFAX disks » telesoftware8.adl » 22-07-88/AUTO

22-07-88/AUTO

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/AUTO
Read OK:
File size: 2C04 bytes
Load address: FFFF1900
Exec address: FFFF8023
File contents
   10REM PORTFOLIO - AUTO-ENTRY
   20REM (C) Jon Leighton Aug 1987
   30:
   40MODE7
   50ON ERROR GOTO 70
   60GOTO 150
   70*TTXOFF
   80VDU7
   90REPORT:PRINTERL,ERR:END
  100ON ERROROFF
  110IF ERR=197 PRINT''"Drive ";FNdrive;" does not exist"
  120IF ERR=199 PRINT''"Disc unformatted or not in drive"
  130PROCkey
  140RUN
  150*FX229,1
  160VDU23;8202;0;0;0;
  170DIM s$(23)
  180DIM SHARE$(19),F%(19),price%(19)
  190DIM SUB%(6),year%(3)
  200DIM block1% 100,mc% 100, block3% &900,line 30
  210PROCassemble
  220minrecord%=251
  230firstptr%=158
  240currentdate%=160
  250maxminptr%=171
  260p$="Portfolio"
  270PROCfindyear
  280PROCstatus
  290FOR V%=1TO4
  300IF V%=4 V%=0
  310IF year%(V%)=0 THEN 400
  320IF V%=0 ndata%=1 ELSE ndata%=20
  330FOR I%=1TO6:SUB%(I%)=FALSE:NEXT
  340FOR I%=0TO19:price%(I%)=0:NEXT
  350discptr%=165
  360CLS
  370PROCcheck_and_open_file
  380IF FILE%=0 GOTO 400
  390PROCedit
  400CLOSE#0
  410IF V%=0 V%=4
  420NEXT
  430PROCchain("MAIN")
  440END
  450:
  460DEFPROCfindyear
  470PROCsystem
  480X%=OPENUP(":0.YEAR")
  490IF X%=0 CLS:PRINTTAB(0,10)"File 'YEAR' does not exist."''"Go to MAIN panel."''"To return to MAIN":PROCkey:PROCchain("MAIN")
  500FOR I%=0TO3
  510INPUT#X%,year%(I%)
  520NEXT
  530CLOSE#0
  540ENDPROC
  550:
  560DEFPROCchain(A$)
  570PROCsystem
  580CHAIN""":0.$."+A$+""""
  590ENDPROC
  600:
  610DEF PROCedit
  620IF V%>0 AND V%<4 PROCauto1:E%=19
  630IF V%=0 PROCauto0:E%=0
  640PTR#FILE%=discptr%
  650FOR ptr=0TOE%
  660BPUT#FILE%,price%(ptr) DIV 100
  670BPUT#FILE%,price%(ptr) MOD 100
  680NEXT
  690REM PUT CURRENT DATE AND DISC POINTER TO DISC
  700PTR#FILE%=currentdate%
  710BPUT#FILE%,D
  720BPUT#FILE%,M
  730BPUT#FILE%,(Y DIV 256)
  740BPUT#FILE%,(Y MOD 256)
  750BPUT#FILE%,DAY
  760BPUT#FILE%,(discptr% DIV 256)
  770BPUT#FILE%,(discptr% MOD 256)
  780REM UPDATE MAX, MIN VALUES ON FILE
  790PTR#FILE%=maxminptr%
  800FOR I%=0TOE%
  810IF price%(I%)=0 GOTO 860
  820min%=BGET#FILE%*256+BGET#FILE%
  830IF min%>price%(I%) PROCupdatemaxmin
  840max%=BGET#FILE%*256+BGET#FILE%
  850IF max%<price%(I%) PROCupdatemaxmin
  860NEXT
  870ENDPROC
  880:
  890DEFPROCupdatemaxmin
  900PTR#FILE%=PTR#FILE%-2
  910BPUT#FILE%,price%(I%) DIV 256
  920BPUT#FILE%,price%(I%) MOD 256
  930ENDPROC
  940:
  950DEFPROCchange_date(C%)
  960discptr%=discptr%+(C%*ndata%*2)
  970IF discptr%<minrecord% discptr%=minrecord%:VDU7:PROCfinish
  980IF discptr%>(EXT#FILE%)-ndata%*2 discptr%=discptr%-(C%*ndata%*2):D=1:M=1:Y=year%(V%)+1:PROCnotfound:PROCcheck_and_open_file:ENDPROC
  990PROCadjustdate
 1000ENDPROC
 1010:
 1020DEFPROCadjustdate
 1030REPEAT
 1040D=D+C%
 1050REPEAT
 1060IF FNvalidate(D,M,Y)=0 D=D+C%
 1070IF D>31 D=1:M=M+1:IF M>12 M=1:Y=Y+1
 1080IF D<1 D=31:M=M-1:IF M<1 M=12:Y=Y-1
 1090UNTIL FNvalidate(D,M,Y)<>0
 1100DAY=DAY+C%
 1110IF DAY<1 DAY=7
 1120IF DAY>7 DAY=1
 1130UNTIL DAY<6
 1140ENDPROC
 1150:
 1160DEFFNvalidate(D,M,Y):=D*M*(M<13)*(D<31+((M+(M>7))AND 1)+(M=2)*(2+((Y AND 3)=0)))
 1170:
 1180DEFPROCcheck_and_open_file
 1190REPEAT
 1200FILE%=OPENUP(STR$(year%(V%)*10+V%))
 1210*FX21,0
 1220CLOSE#0
 1230IF FILE%=0 Y=year%(V%):PROCnotfound
 1240UNTIL FILE%<>0
 1250FILE%=OPENUP(STR$(year%(V%)*10+V%))
 1260PTR#FILE%=0
 1270FOR I%=2TOndata%+1
 1280s$(I%)=""
 1290FOR J%=1TO7
 1300B%=BGET#FILE%
 1310IF B%<32 OR B%>126 B%=32
 1320s$(I%)=s$(I%)+CHR$(B%)
 1330NEXT
 1340NEXT
 1350REM GET CURRENT DATE AND DISC POINTER
 1360PTR#FILE%=currentdate%
 1370D=BGET#FILE%
 1380M=BGET#FILE%
 1390Y=(BGET#FILE%)*256+BGET#FILE%
 1400DAY=BGET#FILE%
 1410discptr%=(BGET#FILE%)*256+BGET#FILE%
 1420S%=TRUE
 1430ENDPROC
 1440:
 1450DEFPROCauto1
 1460TEXT$=""
 1470Z%=0
 1480*TTXON
 1490*BBC1
 1500*HON
 1510REPEAT
 1520REPEAT
 1530*PAGE 130
 1540PROCdata
 1550UNTIL FNcrc<2
 1560PRINTTAB(0,9)CHR$131;'CHR$131;'CHR$131;
 1570IF NOT FNclose PRINTTAB(4,10)"Waiting until close of business.":PROCborder
 1580UNTIL FNclose
 1590CLS
 1600REPEAT
 1610UNTIL FNdate_ok
 1620PROCloadnames
 1630FOR I%=0TOndata%-1
 1640F%(I%)=FALSE
 1650PRINTTAB(0,I%+2)CHR$131;SHARE$(I%)
 1660NEXT
 1670PRINTTAB(18,10)CHR$131;"Entering data for:-"
 1680PRINTTAB(20,13)CHR$131;D;"/";M;"/";Y
 1690REPEAT
 1700REPEAT
 1710REPEAT
 1720*PAGE 130
 1730PROCdata
 1740UNTIL FNcrc<2
 1750UNTIL FNclose
 1760PA%=FNsubpage
 1770PRINTTAB(25,1)CHR$130;"Sub-page ";PA%
 1780CALLmc%
 1790FOR R%=5TO19
 1800PROCgettext(block3%,R%)
 1810PROCsearch
 1820NEXT
 1830SUB%(PA%)=TRUE
 1840UNTILZ%=20 OR SUB%(1)+SUB%(2)+SUB%(3)+SUB%(4)+SUB%(5)+SUB%(6)=(-6)
 1850PRINTTAB(0,21)
 1860*TTXOFF
 1870ENDPROC
 1880:
 1890DEFPROCborder
 1900FOR J%=0TO1
 1910IF J%=0 T1$="_" ELSE T1$=" "
 1920IF J%=0 T2$="I" ELSE T2$=" "
 1930FOR I%=2 TO 37
 1940PROCdelay
 1950PRINTTAB(I%,11)T1$;
 1960NEXT
 1970PRINTTAB(37,10)T2$;
 1980FOR I%=37 TO 2 STEP -1
 1990PROCdelay
 2000PRINTTAB(I%,9)T1$;
 2010NEXT
 2020PRINTTAB(2,10)T2$;
 2030NEXT
 2040ENDPROC
 2050:
 2060DEFPROCdata
 2070$line="DATA "+STR$~(block3%)
 2080X%=line MOD 256
 2090Y%=line DIV 256
 2100CALL&FFF7
 2110ENDPROC
 2120:
 2130DEFPROCauto0
 2140TEXT$=""
 2150*TTXON
 2160*BBC1
 2170*HON
 2180*PAGE 125
 2190REPEAT
 2200UNTIL FNdate_ok
 2210PRINTTAB(5,12)CHR$131;"FT-SE 100"
 2220REPEAT
 2230*PAGE 125
 2240PROCdata
 2250sub_page%=FNsubpage
 2260PRINTTAB(25,1)CHR$130;"Sub-page ";sub_page%
 2270UNTIL FNcrc<2 AND sub_page%=2
 2280CALLmc%
 2290L%=21
 2300PROCgettext(block3%,L%)
 2310PROCsearch1
 2320*TTXOFF
 2330ENDPROC
 2340:
 2350DEFPROCgettext(address%,row%)
 2360TEXT$="":I%=0
 2370REPEAT
 2380pointer%=address%+1+I%*42
 2390I%=I%+1
 2400UNTIL ?pointer%=row% OR I%=24
 2410IF I%<24 pointer%?41=13:TEXT$=$(pointer%+2)
 2420ENDPROC
 2430:
 2440DEFPROCsearch
 2450IF SUB%(PA%) THEN ENDPROC
 2460FOR J%=1 TO 21 STEP 20
 2470FOR I%=0TO19
 2480IF SHARE$(I%)="       " GOTO 2500
 2490IF SHARE$(I%)=MID$(TEXT$,J%,7) PROCfound
 2500NEXT
 2510NEXT
 2520ENDPROC
 2530:
 2540DEFPROCsearch1
 2550price%(0)=VAL(MID$(TEXT$,26,5))
 2560PRINTTAB(16,12)price%(0)
 2570Z%=Z%+1
 2580ENDPROC
 2590:
 2600DEFPROCfound
 2610IF F%(I%)=FALSE Z%=Z%+1:F%(I%)=TRUE:ELSE ENDPROC
 2620PRINTTAB(0,1)CHR$129;"Found ";Z%;" shares"
 2630S%=J%+6
 2640REPEAT
 2650S%=S%+1
 2660UNTIL ASC(MID$(TEXT$,S%,1))>47 AND ASC(MID$(TEXT$,S%,1))<58
 2670E%=S%
 2680REPEAT
 2690E%=E%+1
 2700UNTIL MID$(TEXT$,E%,1)=" "
 2710E%=E%-1
 2720price%(I%)=VAL(MID$(TEXT$,S%,E%-S%+1))
 2730PRINTTAB(10,I%+2)CHR$131;price%(I%)
 2740ENDPROC
 2750:
 2760DEFFNclose
 2770REM Look for the text string "Close" starting at location block3%
 2780FOR J%=block3% TO block3%+&800
 2790TEXT$=""
 2800FOR I%=J% TO J%+4
 2810TEXT$=TEXT$+CHR$(?I% AND 127)
 2820NEXT
 2830IF TEXT$="Close" OR TEXT$="close"J%=&FFFF
 2840NEXT
 2850IF TEXT$="Close" OR TEXT$="close" =TRUE ELSE =FALSE
 2860:
 2870DEFFNdate_ok
 2880REM"�DATE WITH ATS
 2890TIME=0:REPEATUNTILTIME>120
 2900A%=&7A:X%=block1%MOD256:Y%=block1%DIV256:?block1%=15:CALL&FFF1
 2910BB1$=RIGHT$(STR$~(block1%?8),1)
 2920BB2$=STR$~(block1%?9):IF LEN(BB2$)=1 BB2$="0"+BB2$
 2930BB3$=STR$~(block1%?10):IF LEN(BB3$)=1 BB3$="0"+BB3$
 2940JD=VAL(BB1$+BB2$+BB3$)
 2950y%=(100*(JD-15078.2))DIV36525
 2960m%=INT((JD-14956.1-INT(365.25*y%))/30.6001)
 2970d%=JD-14956-INT(365.25*y%)-INT(30.6*m%):K=INT(0.7+(1/(17-m%)))
 2980m%=m%-1-12*K
 2990y%=y%+1900
 3000dd%=y%*10000+m%*100+d%
 3010REM
 3020REM Get hour from CEEFAX
 3030REM
 3040?block1%=21
 3050X%=block1% MOD 256
 3060Y%=block1% DIV 256
 3070A%=&7A
 3080REPEAT
 3090CALL&FFF1
 3100UNTIL block1%?10=0
 3110hr%=VAL(CHR$(block1%?1)+CHR$(block1%?2))
 3120IF hr%<10 dd%=dd%-1
 3130REPEAT
 3140D%=Y*10000+M*100+D
 3150IF D%<dd% PROCchange_date(1)
 3160UNTIL D%>=dd%
 3170REPEAT
 3180D%=Y*10000+M*100+D
 3190IF D%>dd% PROCchange_date(-1)
 3200UNTIL D%<=dd%
 3210=TRUE
 3220:
 3230DEFPROCstatus
 3240REPEAT
 3250?block1%=17
 3260block1%?1=&FE
 3270X%=block1% MOD 256
 3280Y%=block1% DIV 256
 3290A%=&7A
 3300CALL&FFF1
 3310IF block1%?1=1 PRINTTAB(0,10)CHR$129;"Teletext Adaptor on, but no signal."''CHR$129;"Check tuning or aerial."
 3320IF block1%?1=2 PRINTTAB(0,10)CHR$129;"Teletext Adaptor connected,"'CHR$129;"but switched off."'CHR$129;"Switch on, press BREAK and start again."
 3330IF block1%?1=&FF PRINTTAB(0,10)CHR$129;"No Teletext Adaptor connected."
 3340IF block1%?1=&FE PRINTTAB(7,10)CHR$131;"NO ATS ROM INSTALLED"''TAB(5)CHR$131;"INSTALL AND START AGAIN"
 3350UNTILblock1%?1=0
 3360ENDPROC
 3370:
 3380DEFFNcrc
 3390?block1%=23
 3400block1%?1=block3% MOD 256
 3410block1%?2=block3% DIV 256
 3420X%=block1% MOD 256
 3430Y%=block1% DIV 256
 3440A%=&7A
 3450CALL&FFF1
 3460PRINTTAB(20,5)SPC(12)
 3470IF block1%?3=&FF PRINTTAB(20,5)CHR$129;"CRC ERROR.     "
 3480IF block1%?3=0 PRINTTAB(20,5)CHR$129;"WARNING:-NO CRC"
 3490=block1%?3
 3500:
 3510DEFPROCdelay
 3520TIME=0
 3530REPEATUNTILTIME>10
 3540ENDPROC
 3550:
 3560DEFPROCloadnames
 3570PTR#FILE%=0
 3580FOR I%=0TOndata%-1
 3590SHARE$(I%)=""
 3600FOR J%=0TO6
 3610H%=BGET#FILE%
 3620SHARE$(I%)=SHARE$(I%)+CHR$(H%)
 3630NEXT
 3640NEXT
 3650ENDPROC
 3660:
 3670DEFFNsubpage
 3680=block3%?4
 3690:
 3700DEFPROCfinish
 3710*TTXOFF
 3720CLS
 3730PRINTTAB(0,10)CHR$131;"Portfolio ";V%;" starts on ";D;"/";M;"/";Y'CHR$131;"and the CEEFAX date is ";d%;"/";m%;"/";y%''CHR$131;"FATAL ERROR"'CHR$131;"Program terminating":VDU21:END
 3740:
 3750DEFPROCkey
 3760PRINT'"PRESS A KEY"
 3770*FX21,0
 3780K%=GET
 3790ENDPROC
 3800:
 3810DEFFNdrive
 3820X%=block1% MOD 256
 3830Y%=block1% DIV 256
 3840A%=6
 3850FOR I%=0TO11
 3860block1%?I%=0
 3870NEXT
 3880block1%?2=block3% DIV 256
 3890block1%?1=block3% MOD 256
 3900block1%?12=1
 3910CALL&FFD1
 3920=(block3%?1)-48
 3930:
 3940DEFPROCnotfound
 3950*TTXOFF
 3960CLS
 3970year%(V%)=Y
 3980CLOSE#0
 3990f$=""
 4000IF V%=0 f$="Index data" ELSE f$=p$+" "+STR$(V%)
 4010f$=f$+" for "+STR$(year%(V%))
 4020IF year%(V%)=0 AND V%=0 f$="Index data"
 4030IF year%(V%)=0 AND V%<>0 f$="Portfolio data"
 4040REPEAT
 4050PRINTTAB(0,5)f$;" not on this disc:-"
 4060REPEAT
 4070PRINTTAB(2,8)"A) (A)bandon"''TAB(2)"C) (C)atalogue disc"''TAB(2)"D) (D)rive change (currently Drive ";FNdrive;")"''TAB(2)"G) (G)o on"''TAB(2)"S) (S)tart a new file"''TAB(2)"Choose A,C,D,G or S"
 4080REPEAT
 4090*FX21,0
 4100KEY%=GET AND &DF
 4110UNTIL KEY%=65 OR KEY%=67 OR KEY%=68 OR KEY%=71 OR KEY%=83
 4120IF KEY%=67 THEN *.
 4130IF KEY%=68 PRINT'TAB(10)"Enter drive no.";:REPEAT:KEY%=GET-48:UNTILKEY%>-1 AND KEY%<4:PRINT;" ";KEY%:$line="DR."+STR$(KEY%):X%=line MOD 256:Y%=line DIV 256:CALL&FFF7:PRINT''TAB(10)"Drive ";KEY%;" selected"
 4140IF KEY%=65 OR KEY%=71 OR KEY%=83 GOTO 4160
 4150PROCkey
 4160CLS
 4170UNTILKEY%=65 OR KEY%=71 OR KEY%=83
 4180CLOSE#0
 4190B%=OPENUP(STR$(year%(V%)*10+V%))
 4200CLOSE#0
 4210UNTILB%<>0 OR KEY%=65 OR KEY%=83
 4220ON ERROR OFF
 4230IF KEY%=65 PROCchain("MAIN")
 4240IF KEY%=83 PROCopen:ENDPROC
 4250ENDPROC
 4260:
 4270DEFPROCopen
 4280IF V%=0 f$="Index" ELSE f$=p$+" "+STR$(V%)
 4290PRINTTAB(0,3)f$;" for ";year%(V%)
 4300PRINTTAB(0,5)"A new file will be opened if there is"'"enough space."''"Do you wish to start a new file? (Y/N)"
 4310REPEAT
 4320*FX21,0
 4330A%=GET AND &DF
 4340UNTIL A%=78 OR A%=89
 4350IF A%=78 ENDPROC
 4360REPEAT
 4370REPEAT
 4380PRINT'"Enter date from which ";f$'"is to start in the form DD/MM"'"where DD is the day of the month"'"and MM is the month of the year";:INPUTa$:a$=a$+"/"+STR$(year%(V%))
 4390IF MID$(a$,3,1)<>"/" PROCerrordate:GOTO 4380
 4400FOR I%=1TO10
 4410IF I%=3 OR I%=6 GOTO 4430
 4420IF MID$(a$,I%,1)<"0" OR MID$(a$,I%,1)>"9" PROCerrordate:I%=20
 4430NEXT
 4440UNTIL I%<19
 4450D=VAL(MID$(a$,1,2))
 4460M=VAL(MID$(a$,4,2))
 4470Y=VAL(MID$(a$,7,4))
 4480IF FNvalidate(D,M,Y)=0 PROCerrordate
 4490UNTIL FNvalidate(D,M,Y)<>0
 4500INPUT'"And enter day of week (Monday=1) "DAY
 4510IF DAY>5 PRINT'"Weekends are not allowed !"'"The next Monday will be used and"'"the date will be adjusted.":C%=1:PROCadjustdate
 4520CLS
 4530PRINTTAB(2,5)"INITIALISING - Please wait"
 4540B%=OPENUP(STR$(year%(V%)-1)+STR$(V%))
 4550IF B%=0 GOTO 4650
 4560REM Take a copy of sharenames for new file
 4570FORI%=1TOndata%
 4580s$(I%)=""
 4590FORJ%=1TO7
 4600s$(I%)=s$(I%)+CHR$(BGET#B%)
 4610NEXT
 4620NEXT
 4630CLOSE#0
 4640REM Send data to disc as outlined at start of prog.
 4650PROCespace
 4660PROCopen2
 4670PROCpushyear
 4680ON ERROR OFF
 4690ENDPROC
 4700:
 4710DEFPROCopen2
 4720$line="SAVE "+STR$(year%(V%))+STR$(V%)+" 2000 +"+STR$~D%
 4730CALL&FFF7
 4740A%=OPENOUT(STR$(year%(V%))+STR$(V%))
 4750FORI%=1TOndata%
 4760FORJ%=1TO7
 4770BPUT#A%,ASC(MID$(s$(I%),J%,1))
 4780NEXT
 4790NEXT
 4800PTR#A%=firstptr%
 4810BPUT#A%,minrecord% DIV 256
 4820BPUT#A%,minrecord% MOD 256
 4830BPUT#A%,D
 4840BPUT#A%,M
 4850BPUT#A%,(Y DIV 256)
 4860BPUT#A%,(Y MOD 256)
 4870BPUT#A%,DAY
 4880BPUT#A%,minrecord% DIV 256
 4890BPUT#A%,minrecord% MOD 256
 4900BPUT#A%,D
 4910BPUT#A%,M
 4920BPUT#A%,(Y DIV 256)
 4930BPUT#A%,(Y MOD 256)
 4940FOR I%=1TOndata%
 4950BPUT#A%,&FF
 4960BPUT#A%,&FF
 4970BPUT#A%,0
 4980BPUT#A%,0
 4990NEXT
 5000PTR#A%=minrecord%
 5010C%=1
 5020G%=VPOS+1
 5030OLDY=Y
 5040C%=1
 5050REPEAT
 5060PROCadjustdate
 5070IF Y<>OLDY GOTO 5120
 5080FOR I%=1TOndata%*2
 5090BPUT#A%,0
 5100NEXT
 5110PRINTTAB(5,G%)D;"/";M;"/";Y;" "
 5120UNTIL Y<>OLDY
 5130FOR I%=1TOndata%*2
 5140BPUT#A%,0
 5150NEXT
 5160CLOSE#0
 5170PROCthold(1)
 5180REM Set current disc pointer to point at current data point ie first
 5190discptr%=minrecord%
 5200CLOSE#0
 5210CLS
 5220ON ERROR OFF
 5230ENDPROC
 5240:
 5250DEFPROCthold(B%)
 5260IF B%=0:tempday=DAY:tempd=D:tempm=M:tempy=Y
 5270IF B%=1 DAY=tempday:D=tempd:M=tempm:Y=tempy
 5280ENDPROC
 5290:
 5300DEFPROCespace
 5310PROCthold(0)
 5320C%=1
 5330D%=0
 5340OLDY=Y
 5350REPEAT
 5360PROCadjustdate
 5370D%=D%+1
 5380UNTILY<>OLDY
 5390PROCthold(1)
 5400D%=(D%-1)*ndata%*2
 5410X%=line MOD 256
 5420Y%=line DIV 256
 5430ON ERROR OFF
 5440ENDPROC
 5450:
 5460DEFPROCerrordate
 5470CLS
 5480PRINTTAB(5,10)"Error in date."''"Press a KEY to re-enter"
 5490I%=GET
 5500CLS
 5510ENDPROC
 5520:
 5530DEFPROCpushyear
 5540PROCsystem
 5550X%=OPENOUT(":0.YEAR")
 5560FOR I%=0TO3
 5570PRINT#X%,year%(I%)
 5580NEXT
 5590ENDPROC
 5600:
 5610DEFPROCsystem
 5620REPEAT
 5630*FX21,0
 5640A%=OPENUP(":0.MAIN")
 5650CLOSE#0
 5660IF A%=0 CLS:PRINTTAB(0,10)"Insert System Disc in drive 0"''"and press any key to continue":REPEATUNTILGET
 5670UNTIL A%<>0
 5680ENDPROC
 5690:
 5700DEFPROCassemble
 5710VDU21
 5720FOR N%=0TO2 STEP2
 5730P%=mc%
 5740[
 5750OPT N%
 5760.start
 5770    lda #block3% MOD 256:sta &80:lda #block3% DIV 256:sta &81
 5780.loop
 5790    ldy #2
 5800.loop1
 5810    lda (&80),Y:and #&7F:sta (&80),Y
 5820.ok1
 5830    cmp #32:bcs ok2:lda #32:sta (&80),Y
 5840.ok2
 5850    iny:cpy #42:bcc loop1:clc:lda #42:adc &80:sta &80:lda #0:adc &81:sta &81:cmp #(block3%+&800) DIV 256:bcc loop:lda &80:cmp #(block3% MOD 256):bcc loop:rts
 5860]
 5870NEXT
 5880VDU6
 5890ENDPROC

� PORTFOLIO - AUTO-ENTRY
� (C) Jon Leighton Aug 1987
:
(�7
2� � � �DF@
<
� �tV@
F*TTXOFF
P�7
Z�:�,�:�
d� ��
n0� �=197 �''"Drive ";�drive;" does not exist"
x1� �=199 �''"Disc unformatted or not in drive"
��key
��
�*FX229,1
��23;8202;0;0;0;
�� s$(23)
�"� SHARE$(19),F%(19),price%(19)
�� SUB%(6),year%(3)
�/� block1% 100,mc% 100, block3% &900,line 30
�
�assemble
�minrecord%=251
�firstptr%=158
�currentdate%=160
�maxminptr%=171
p$="Portfolio"

�findyear
�status
"� V%=1�4
,� V%=4 V%=0
6� year%(V%)=0 � �tPA
@� V%=0 ndata%=1 � ndata%=20
J� I%=1�6:SUB%(I%)=�:�
T� I%=0�19:price%(I%)=0:�
^discptr%=165
h�
r�check_and_open_file
|� FILE%=0 � �tPA
�	�edit
��#0
�� V%=0 V%=4
��
��chain("MAIN")
��
�:
���findyear
��system
�X%=�(":0.YEAR")
�o� X%=0 �:�0,10)"File 'YEAR' does not exist."''"Go to MAIN panel."''"To return to MAIN":�key:�chain("MAIN")
�� I%=0�3
��#X%,year%(I%)
�
�#0
�
&:
0��chain(A$)
:�system
D�""":0.$."+A$+""""
N�
X:
b� �edit
l� V%>0 � V%<4 �auto1:E%=19
v� V%=0 �auto0:E%=0
��#FILE%=discptr%
�� ptr=0�E%
��#FILE%,price%(ptr) � 100
��#FILE%,price%(ptr) � 100
��
�/� PUT CURRENT DATE AND DISC POINTER TO DISC
��#FILE%=currentdate%
�
�#FILE%,D
�
�#FILE%,M
��#FILE%,(Y � 256)
��#FILE%,(Y � 256)
��#FILE%,DAY
��#FILE%,(discptr% � 256)
�#FILE%,(discptr% � 256)
$� UPDATE MAX, MIN VALUES ON FILE
�#FILE%=maxminptr%
 
� I%=0�E%
*� price%(I%)=0 � �D\C
4min%=�#FILE%*256+�#FILE%
>#� min%>price%(I%) �updatemaxmin
Hmax%=�#FILE%*256+�#FILE%
R#� max%<price%(I%) �updatemaxmin
\�
f�
p:
z��updatemaxmin
��#FILE%=�#FILE%-2
��#FILE%,price%(I%) � 256
��#FILE%,price%(I%) � 256
��
�:
���change_date(C%)
�#discptr%=discptr%+(C%*ndata%*2)
�8� discptr%<minrecord% discptr%=minrecord%:�7:�finish
�x� discptr%>(�#FILE%)-ndata%*2 discptr%=discptr%-(C%*ndata%*2):D=1:M=1:Y=year%(V%)+1:�notfound:�check_and_open_file:�
��adjustdate
��
�:
���adjustdate
�

D=D+C%
�
$� �validate(D,M,Y)=0 D=D+C%
.%� D>31 D=1:M=M+1:� M>12 M=1:Y=Y+1
8%� D<1 D=31:M=M-1:� M<1 M=12:Y=Y-1
B� �validate(D,M,Y)<>0
LDAY=DAY+C%
V� DAY<1 DAY=7
`� DAY>7 DAY=1
j� DAY<6
t�
~:
�Mݤvalidate(D,M,Y):=D*M*(M<13)*(D<31+((M+(M>7))� 1)+(M=2)*(2+((Y � 3)=0)))
�:
���check_and_open_file
��
�FILE%=�(�(year%(V%)*10+V%))
�*FX21,0
��#0
�#� FILE%=0 Y=year%(V%):�notfound
�� FILE%<>0
�FILE%=�(�(year%(V%)*10+V%))
�
�#FILE%=0
�� I%=2�ndata%+1

s$(I%)=""

� J%=1�7
B%=�#FILE%
� B%<32 � B%>126 B%=32
(s$(I%)=s$(I%)+�(B%)
2�
<�
F'� GET CURRENT DATE AND DISC POINTER
P�#FILE%=currentdate%
Z
D=�#FILE%
d
M=�#FILE%
nY=(�#FILE%)*256+�#FILE%
xDAY=�#FILE%
�"discptr%=(�#FILE%)*256+�#FILE%
�S%=�
��
�:
���auto1
�TEXT$=""
�Z%=0
�
*TTXON
�	*BBC1
�*HON
��
��
�
*PAGE 130
	�data
� �crc<2
�0,9)�131;'�131;'�131;
"@� � �close �4,10)"Waiting until close of business.":�border
,� �close
6�
@�
J� �date_ok
T�loadnames
^� I%=0�ndata%-1
hF%(I%)=�
r�0,I%+2)�131;SHARE$(I%)
|�
�&�18,10)�131;"Entering data for:-"
��20,13)�131;D;"/";M;"/";Y
��
��
��
�
*PAGE 130
�	�data
�� �crc<2
�� �close
�PA%=�subpage
��25,1)�130;"Sub-page ";PA%
��mc%
�
� R%=5�19
�gettext(block3%,R%)
�search
�
&SUB%(PA%)=�
0A�Z%=20 � SUB%(1)+SUB%(2)+SUB%(3)+SUB%(4)+SUB%(5)+SUB%(6)=(-6)
:�0,21)
D*TTXOFF
N�
X:
b��border
l� J%=0�1
v� J%=0 T1$="_" � T1$=" "
�� J%=0 T2$="I" � T2$=" "
�� I%=2 � 37
�
�delay
��I%,11)T1$;
��
��37,10)T2$;
�� I%=37 � 2 � -1
�
�delay
��I%,9)T1$;
��
��2,10)T2$;
��
��
:

��data
$line="DATA "+�~(block3%)
 X%=line � 256
*Y%=line � 256
4
�&FFF7
>�
H:
R��auto0
\TEXT$=""
f
*TTXON
p	*BBC1
z*HON
�
*PAGE 125
��
�� �date_ok
��5,12)�131;"FT-SE 100"
��
�
*PAGE 125
�	�data
�sub_page%=�subpage
�%�25,1)�130;"Sub-page ";sub_page%
�� �crc<2 � sub_page%=2
��mc%
�	L%=21
��gettext(block3%,L%)
	�search1
	*TTXOFF
	�
	$:
	.��gettext(address%,row%)
	8TEXT$="":I%=0
	B�
	Lpointer%=address%+1+I%*42
	VI%=I%+1
	`� ?pointer%=row% � I%=24
	j.� I%<24 pointer%?41=13:TEXT$=$(pointer%+2)
	t�
	~:
	���search
	�� SUB%(PA%) � �
	�� J%=1 � 21 � 20
	�
� I%=0�19
	�!� SHARE$(I%)="       " � �dDI
	�$� SHARE$(I%)=�TEXT$,J%,7) �found
	��
	��
	��
	�:
	�
��search1
	�price%(0)=�(�TEXT$,26,5))
�16,12)price%(0)

Z%=Z%+1
�
:
(��found
2#� F%(I%)=� Z%=Z%+1:F%(I%)=�:� �
<$�0,1)�129;"Found ";Z%;" shares"
FS%=J%+6
P�
ZS%=S%+1
d-� �(�TEXT$,S%,1))>47 � �(�TEXT$,S%,1))<58
n	E%=S%
x�
�E%=E%+1
�� �TEXT$,E%,1)=" "
�E%=E%-1
�$price%(I%)=�(�TEXT$,S%,E%-S%+1))
��10,I%+2)�131;price%(I%)
��
�:
�ݤclose
�C� Look for the text string "Close" starting at location block3%
�� J%=block3% � block3%+&800
�TEXT$=""
�� I%=J% � J%+4
�TEXT$=TEXT$+�(?I% � 127)
�
+� TEXT$="Close" � TEXT$="close"J%=&FFFF
�
"+� TEXT$="Close" � TEXT$="close" =� � =�
,:
6
ݤdate_ok
@�"�DATE WITH ATS
J�=0:���>120
T;A%=&7A:X%=block1%�256:Y%=block1%�256:?block1%=15:�&FFF1
^BB1$=��~(block1%?8),1)
h0BB2$=�~(block1%?9):� �(BB2$)=1 BB2$="0"+BB2$
r1BB3$=�~(block1%?10):� �(BB3$)=1 BB3$="0"+BB3$
|JD=�(BB1$+BB2$+BB3$)
�y%=(100*(JD-15078.2))�36525
�+m%=�((JD-14956.1-�(365.25*y%))/30.6001)
�<d%=JD-14956-�(365.25*y%)-�(30.6*m%):K=�(0.7+(1/(17-m%)))
�m%=m%-1-12*K
�y%=y%+1900
�dd%=y%*10000+m%*100+d%
��
�� Get hour from CEEFAX
��
�?block1%=21
�X%=block1% � 256
�Y%=block1% � 256
�
A%=&7A
�

�&FFF1
� block1%?10=0
&$hr%=�(�(block1%?1)+�(block1%?2))
0� hr%<10 dd%=dd%-1
:�
DD%=Y*10000+M*100+D
N� D%<dd% �change_date(1)
X
� D%>=dd%
b�
lD%=Y*10000+M*100+D
v� D%>dd% �change_date(-1)
�
� D%<=dd%
�=�
�:
���status
��
�?block1%=17
�block1%?1=&FE
�X%=block1% � 256
�Y%=block1% � 256
�
A%=&7A
�
�&FFF1
�c� block1%?1=1 �0,10)�129;"Teletext Adaptor on, but no signal."''�129;"Check tuning or aerial."
��� block1%?1=2 �0,10)�129;"Teletext Adaptor connected,"'�129;"but switched off."'�129;"Switch on, press BREAK and start again."

@� block1%?1=&FF �0,10)�129;"No Teletext Adaptor connected."

Y� block1%?1=&FE �7,10)�131;"NO ATS ROM INSTALLED"''�5)�131;"INSTALL AND START AGAIN"

�block1%?1=0

 �

*:

4	ݤcrc

>?block1%=23

Hblock1%?1=block3% � 256

Rblock1%?2=block3% � 256

\X%=block1% � 256

fY%=block1% � 256

p
A%=&7A

z
�&FFF1

��20,5)�(12)

�1� block1%?3=&FF �20,5)�129;"CRC ERROR.     "

�/� block1%?3=0 �20,5)�129;"WARNING:-NO CRC"

�=block1%?3

�:

���delay

��=0

�
���>10

��

�:

���loadnames

�
�#FILE%=0

�� I%=0�ndata%-1
SHARE$(I%)=""
� J%=0�6
H%=�#FILE%
$SHARE$(I%)=SHARE$(I%)+�(H%)
.�
8�
B�
L:
V
ݤsubpage
`=block3%?4
j:
t��finish
~*TTXOFF
��
���0,10)�131;"Portfolio ";V%;" starts on ";D;"/";M;"/";Y'�131;"and the CEEFAX date is ";d%;"/";m%;"/";y%''�131;"FATAL ERROR"'�131;"Program terminating":�21:�
�:
�	��key
��'"PRESS A KEY"
�*FX21,0
�K%=�
��
�:
�ݤdrive
�X%=block1% � 256
�Y%=block1% � 256
A%=6


� I%=0�11
block1%?I%=0
�
(block1%?2=block3% � 256
2block1%?1=block3% � 256
<block1%?12=1
F
�&FFD1
P=(block3%?1)-48
Z:
d��notfound
n*TTXOFF
x�
�year%(V%)=Y
��#0
�	f$=""
�,� V%=0 f$="Index data" � f$=p$+" "+�(V%)
�f$=f$+" for "+�(year%(V%))
�(� year%(V%)=0 � V%=0 f$="Index data"
�-� year%(V%)=0 � V%<>0 f$="Portfolio data"
��
�"�0,5)f$;" not on this disc:-"
��
��2,8)"A) (A)bandon"''�2)"C) (C)atalogue disc"''�2)"D) (D)rive change (currently Drive ";�drive;")"''�2)"G) (G)o on"''�2)"S) (S)tart a new file"''�2)"Choose A,C,D,G or S"
��
�*FX21,0
KEY%=� � &DF
5� KEY%=65 � KEY%=67 � KEY%=68 � KEY%=71 � KEY%=83
� KEY%=67 � *.
"�� KEY%=68 �'�10)"Enter drive no.";:�:KEY%=�-48:�KEY%>-1 � KEY%<4:�;" ";KEY%:$line="DR."+�(KEY%):X%=line � 256:Y%=line � 256:�&FFF7:�''�10)"Drive ";KEY%;" selected"
,(� KEY%=65 � KEY%=71 � KEY%=83 � �D@P
6�key
@�
J �KEY%=65 � KEY%=71 � KEY%=83
T�#0
^B%=�(�(year%(V%)*10+V%))
h�#0
r�B%<>0 � KEY%=65 � KEY%=83
|	� � �
�� KEY%=65 �chain("MAIN")
�� KEY%=83 �open:�
��
�:
�
��open
�'� V%=0 f$="Index" � f$=p$+" "+�(V%)
��0,3)f$;" for ";year%(V%)
�k�0,5)"A new file will be opened if there is"'"enough space."''"Do you wish to start a new file? (Y/N)"
��
�*FX21,0
�A%=� � &DF
�� A%=78 � A%=89
�
� A%=78 �
�
�
��'"Enter date from which ";f$'"is to start in the form DD/MM"'"where DD is the day of the month"'"and MM is the month of the year";:�a$:a$=a$+"/"+�(year%(V%))
&%� �a$,3,1)<>"/" �errordate:� �T\Q
0
� I%=1�10
:� I%=3 � I%=6 � �DNQ
D4� �a$,I%,1)<"0" � �a$,I%,1)>"9" �errordate:I%=20
N�
X� I%<19
bD=�(�a$,1,2))
lM=�(�a$,4,2))
vY=�(�a$,7,4))
�#� �validate(D,M,Y)=0 �errordate
�� �validate(D,M,Y)<>0
�,�'"And enter day of week (Monday=1) "DAY
�{� DAY>5 �'"Weekends are not allowed !"'"The next Monday will be used and"'"the date will be adjusted.":C%=1:�adjustdate
��
�&�2,5)"INITIALISING - Please wait"
�B%=�(�(year%(V%)-1)+�(V%))
�� B%=0 � �TjR
�,� Take a copy of sharenames for new file
��I%=1�ndata%
�
s$(I%)=""
��J%=1�7
�s$(I%)=s$(I%)+�(�#B%)
�
�
�#0
 5� Send data to disc as outlined at start of prog.
*�espace
4
�open2
>
�pushyear
H	� � �
R�
\:
f��open2
p3$line="SAVE "+�(year%(V%))+�(V%)+" 2000 +"+�~D%
z
�&FFF7
�A%=�(�(year%(V%))+�(V%))
��I%=1�ndata%
��J%=1�7
��#A%,�(�s$(I%),J%,1))
��
��
��#A%=firstptr%
��#A%,minrecord% � 256
��#A%,minrecord% � 256
�
�#A%,D
�
�#A%,M
��#A%,(Y � 256)
��#A%,(Y � 256)
�#A%,DAY
�#A%,minrecord% � 256
�#A%,minrecord% � 256
$
�#A%,D
.
�#A%,M
8�#A%,(Y � 256)
B�#A%,(Y � 256)
L� I%=1�ndata%
V�#A%,&FF
`�#A%,&FF
j
�#A%,0
t
�#A%,0
~�
��#A%=minrecord%
�C%=1
�
G%=�+1
�
OLDY=Y
�C%=1
��
��adjustdate
�� Y<>OLDY � �T@T
�� I%=1�ndata%*2
�
�#A%,0
��
��5,G%)D;"/";M;"/";Y;" "

� Y<>OLDY

� I%=1�ndata%*2

�#A%,0
�
(�#0
2
�thold(1)
<F� Set current disc pointer to point at current data point ie first
Fdiscptr%=minrecord%
P�#0
Z�
d	� � �
n�
x:
���thold(B%)
�.� B%=0:tempday=DAY:tempd=D:tempm=M:tempy=Y
�.� B%=1 DAY=tempday:D=tempd:M=tempm:Y=tempy
��
�:
���espace
�
�thold(0)
�C%=1
�D%=0
�
OLDY=Y
��
��adjustdate
�D%=D%+1
�Y<>OLDY

�thold(1)
D%=(D%-1)*ndata%*2
"X%=line � 256
,Y%=line � 256
6	� � �
@�
J:
T��errordate
^�
h6�5,10)"Error in date."''"Press a KEY to re-enter"
rI%=�
|�
��
�:
���pushyear
��system
�X%=�(":0.YEAR")
�� I%=0�3
��#X%,year%(I%)
��
��
�:
���system
��
�*FX21,0
A%=�(":0.MAIN")
�#0
X� A%=0 �:�0,10)"Insert System Disc in drive 0"''"and press any key to continue":���
&� A%<>0
0�
::
D��assemble
N�21
X� N%=0�2 �2
b
P%=mc%
l[
v
OPT N%
�
.start
�=    lda #block3% � 256:sta &80:lda #block3% � 256:sta &81
�	.loop
�    ldy #2
�
.loop1
�(    lda (&80),Y:and #&7F:sta (&80),Y
�.ok1
�+    cmp #32:bcs ok2:lda #32:sta (&80),Y
�.ok2
ڝ    iny:cpy #42:bcc loop1:clc:lda #42:adc &80:sta &80:lda #0:adc &81:sta &81:cmp #(block3%+&800) � 256:bcc loop:lda &80:cmp #(block3% � 256):bcc loop:rts
�]
��
��6
�
�
00000000  0d 00 0a 1c f4 20 50 4f  52 54 46 4f 4c 49 4f 20  |..... PORTFOLIO |
00000010  2d 20 41 55 54 4f 2d 45  4e 54 52 59 0d 00 14 1f  |- AUTO-ENTRY....|
00000020  f4 20 28 43 29 20 4a 6f  6e 20 4c 65 69 67 68 74  |. (C) Jon Leight|
00000030  6f 6e 20 41 75 67 20 31  39 38 37 0d 00 1e 05 3a  |on Aug 1987....:|
00000040  0d 00 28 06 eb 37 0d 00  32 0e ee 20 85 20 e5 20  |..(..7..2.. . . |
00000050  8d 44 46 40 0d 00 3c 0a  e5 20 8d 74 56 40 0d 00  |.DF@..<.. .tV@..|
00000060  46 0b 2a 54 54 58 4f 46  46 0d 00 50 06 ef 37 0d  |F.*TTXOFF..P..7.|
00000070  00 5a 0c f6 3a f1 9e 2c  9f 3a e0 0d 00 64 08 ee  |.Z..:..,.:...d..|
00000080  20 85 87 0d 00 6e 30 e7  20 9f 3d 31 39 37 20 f1  | ....n0. .=197 .|
00000090  27 27 22 44 72 69 76 65  20 22 3b a4 64 72 69 76  |''"Drive ";.driv|
000000a0  65 3b 22 20 64 6f 65 73  20 6e 6f 74 20 65 78 69  |e;" does not exi|
000000b0  73 74 22 0d 00 78 31 e7  20 9f 3d 31 39 39 20 f1  |st"..x1. .=199 .|
000000c0  27 27 22 44 69 73 63 20  75 6e 66 6f 72 6d 61 74  |''"Disc unformat|
000000d0  74 65 64 20 6f 72 20 6e  6f 74 20 69 6e 20 64 72  |ted or not in dr|
000000e0  69 76 65 22 0d 00 82 08  f2 6b 65 79 0d 00 8c 05  |ive".....key....|
000000f0  f9 0d 00 96 0c 2a 46 58  32 32 39 2c 31 0d 00 a0  |.....*FX229,1...|
00000100  13 ef 32 33 3b 38 32 30  32 3b 30 3b 30 3b 30 3b  |..23;8202;0;0;0;|
00000110  0d 00 aa 0c de 20 73 24  28 32 33 29 0d 00 b4 22  |..... s$(23)..."|
00000120  de 20 53 48 41 52 45 24  28 31 39 29 2c 46 25 28  |. SHARE$(19),F%(|
00000130  31 39 29 2c 70 72 69 63  65 25 28 31 39 29 0d 00  |19),price%(19)..|
00000140  be 16 de 20 53 55 42 25  28 36 29 2c 79 65 61 72  |... SUB%(6),year|
00000150  25 28 33 29 0d 00 c8 2f  de 20 62 6c 6f 63 6b 31  |%(3).../. block1|
00000160  25 20 31 30 30 2c 6d 63  25 20 31 30 30 2c 20 62  |% 100,mc% 100, b|
00000170  6c 6f 63 6b 33 25 20 26  39 30 30 2c 6c 69 6e 65  |lock3% &900,line|
00000180  20 33 30 0d 00 d2 0d f2  61 73 73 65 6d 62 6c 65  | 30.....assemble|
00000190  0d 00 dc 12 6d 69 6e 72  65 63 6f 72 64 25 3d 32  |....minrecord%=2|
000001a0  35 31 0d 00 e6 11 66 69  72 73 74 70 74 72 25 3d  |51....firstptr%=|
000001b0  31 35 38 0d 00 f0 14 63  75 72 72 65 6e 74 64 61  |158....currentda|
000001c0  74 65 25 3d 31 36 30 0d  00 fa 12 6d 61 78 6d 69  |te%=160....maxmi|
000001d0  6e 70 74 72 25 3d 31 37  31 0d 01 04 12 70 24 3d  |nptr%=171....p$=|
000001e0  22 50 6f 72 74 66 6f 6c  69 6f 22 0d 01 0e 0d f2  |"Portfolio".....|
000001f0  66 69 6e 64 79 65 61 72  0d 01 18 0b f2 73 74 61  |findyear.....sta|
00000200  74 75 73 0d 01 22 0c e3  20 56 25 3d 31 b8 34 0d  |tus..".. V%=1.4.|
00000210  01 2c 0f e7 20 56 25 3d  34 20 56 25 3d 30 0d 01  |.,.. V%=4 V%=0..|
00000220  36 18 e7 20 79 65 61 72  25 28 56 25 29 3d 30 20  |6.. year%(V%)=0 |
00000230  8c 20 8d 74 50 41 0d 01  40 1f e7 20 56 25 3d 30  |. .tPA..@.. V%=0|
00000240  20 6e 64 61 74 61 25 3d  31 20 8b 20 6e 64 61 74  | ndata%=1 . ndat|
00000250  61 25 3d 32 30 0d 01 4a  19 e3 20 49 25 3d 31 b8  |a%=20..J.. I%=1.|
00000260  36 3a 53 55 42 25 28 49  25 29 3d a3 3a ed 0d 01  |6:SUB%(I%)=.:...|
00000270  54 1c e3 20 49 25 3d 30  b8 31 39 3a 70 72 69 63  |T.. I%=0.19:pric|
00000280  65 25 28 49 25 29 3d 30  3a ed 0d 01 5e 10 64 69  |e%(I%)=0:...^.di|
00000290  73 63 70 74 72 25 3d 31  36 35 0d 01 68 05 db 0d  |scptr%=165..h...|
000002a0  01 72 18 f2 63 68 65 63  6b 5f 61 6e 64 5f 6f 70  |.r..check_and_op|
000002b0  65 6e 5f 66 69 6c 65 0d  01 7c 14 e7 20 46 49 4c  |en_file..|.. FIL|
000002c0  45 25 3d 30 20 e5 20 8d  74 50 41 0d 01 86 09 f2  |E%=0 . .tPA.....|
000002d0  65 64 69 74 0d 01 90 07  d9 23 30 0d 01 9a 0f e7  |edit.....#0.....|
000002e0  20 56 25 3d 30 20 56 25  3d 34 0d 01 a4 05 ed 0d  | V%=0 V%=4......|
000002f0  01 ae 12 f2 63 68 61 69  6e 28 22 4d 41 49 4e 22  |....chain("MAIN"|
00000300  29 0d 01 b8 05 e0 0d 01  c2 05 3a 0d 01 cc 0e dd  |).........:.....|
00000310  f2 66 69 6e 64 79 65 61  72 0d 01 d6 0b f2 73 79  |.findyear.....sy|
00000320  73 74 65 6d 0d 01 e0 13  58 25 3d ad 28 22 3a 30  |stem....X%=.(":0|
00000330  2e 59 45 41 52 22 29 0d  01 ea 6f e7 20 58 25 3d  |.YEAR")...o. X%=|
00000340  30 20 db 3a f1 8a 30 2c  31 30 29 22 46 69 6c 65  |0 .:..0,10)"File|
00000350  20 27 59 45 41 52 27 20  64 6f 65 73 20 6e 6f 74  | 'YEAR' does not|
00000360  20 65 78 69 73 74 2e 22  27 27 22 47 6f 20 74 6f  | exist."''"Go to|
00000370  20 4d 41 49 4e 20 70 61  6e 65 6c 2e 22 27 27 22  | MAIN panel."''"|
00000380  54 6f 20 72 65 74 75 72  6e 20 74 6f 20 4d 41 49  |To return to MAI|
00000390  4e 22 3a f2 6b 65 79 3a  f2 63 68 61 69 6e 28 22  |N":.key:.chain("|
000003a0  4d 41 49 4e 22 29 0d 01  f4 0c e3 20 49 25 3d 30  |MAIN")..... I%=0|
000003b0  b8 33 0d 01 fe 12 e8 23  58 25 2c 79 65 61 72 25  |.3.....#X%,year%|
000003c0  28 49 25 29 0d 02 08 05  ed 0d 02 12 07 d9 23 30  |(I%)..........#0|
000003d0  0d 02 1c 05 e1 0d 02 26  05 3a 0d 02 30 0f dd f2  |.......&.:..0...|
000003e0  63 68 61 69 6e 28 41 24  29 0d 02 3a 0b f2 73 79  |chain(A$)..:..sy|
000003f0  73 74 65 6d 0d 02 44 16  d7 22 22 22 3a 30 2e 24  |stem..D..""":0.$|
00000400  2e 22 2b 41 24 2b 22 22  22 22 0d 02 4e 05 e1 0d  |."+A$+""""..N...|
00000410  02 58 05 3a 0d 02 62 0b  dd 20 f2 65 64 69 74 0d  |.X.:..b.. .edit.|
00000420  02 6c 1e e7 20 56 25 3e  30 20 80 20 56 25 3c 34  |.l.. V%>0 . V%<4|
00000430  20 f2 61 75 74 6f 31 3a  45 25 3d 31 39 0d 02 76  | .auto1:E%=19..v|
00000440  16 e7 20 56 25 3d 30 20  f2 61 75 74 6f 30 3a 45  |.. V%=0 .auto0:E|
00000450  25 3d 30 0d 02 80 14 cf  23 46 49 4c 45 25 3d 64  |%=0.....#FILE%=d|
00000460  69 73 63 70 74 72 25 0d  02 8a 0e e3 20 70 74 72  |iscptr%..... ptr|
00000470  3d 30 b8 45 25 0d 02 94  1d d5 23 46 49 4c 45 25  |=0.E%.....#FILE%|
00000480  2c 70 72 69 63 65 25 28  70 74 72 29 20 81 20 31  |,price%(ptr) . 1|
00000490  30 30 0d 02 9e 1d d5 23  46 49 4c 45 25 2c 70 72  |00.....#FILE%,pr|
000004a0  69 63 65 25 28 70 74 72  29 20 83 20 31 30 30 0d  |ice%(ptr) . 100.|
000004b0  02 a8 05 ed 0d 02 b2 2f  f4 20 50 55 54 20 43 55  |......./. PUT CU|
000004c0  52 52 45 4e 54 20 44 41  54 45 20 41 4e 44 20 44  |RRENT DATE AND D|
000004d0  49 53 43 20 50 4f 49 4e  54 45 52 20 54 4f 20 44  |ISC POINTER TO D|
000004e0  49 53 43 0d 02 bc 18 cf  23 46 49 4c 45 25 3d 63  |ISC.....#FILE%=c|
000004f0  75 72 72 65 6e 74 64 61  74 65 25 0d 02 c6 0d d5  |urrentdate%.....|
00000500  23 46 49 4c 45 25 2c 44  0d 02 d0 0d d5 23 46 49  |#FILE%,D.....#FI|
00000510  4c 45 25 2c 4d 0d 02 da  15 d5 23 46 49 4c 45 25  |LE%,M.....#FILE%|
00000520  2c 28 59 20 81 20 32 35  36 29 0d 02 e4 15 d5 23  |,(Y . 256).....#|
00000530  46 49 4c 45 25 2c 28 59  20 83 20 32 35 36 29 0d  |FILE%,(Y . 256).|
00000540  02 ee 0f d5 23 46 49 4c  45 25 2c 44 41 59 0d 02  |....#FILE%,DAY..|
00000550  f8 1c d5 23 46 49 4c 45  25 2c 28 64 69 73 63 70  |...#FILE%,(discp|
00000560  74 72 25 20 81 20 32 35  36 29 0d 03 02 1c d5 23  |tr% . 256).....#|
00000570  46 49 4c 45 25 2c 28 64  69 73 63 70 74 72 25 20  |FILE%,(discptr% |
00000580  83 20 32 35 36 29 0d 03  0c 24 f4 20 55 50 44 41  |. 256)...$. UPDA|
00000590  54 45 20 4d 41 58 2c 20  4d 49 4e 20 56 41 4c 55  |TE MAX, MIN VALU|
000005a0  45 53 20 4f 4e 20 46 49  4c 45 0d 03 16 16 cf 23  |ES ON FILE.....#|
000005b0  46 49 4c 45 25 3d 6d 61  78 6d 69 6e 70 74 72 25  |FILE%=maxminptr%|
000005c0  0d 03 20 0d e3 20 49 25  3d 30 b8 45 25 0d 03 2a  |.. .. I%=0.E%..*|
000005d0  19 e7 20 70 72 69 63 65  25 28 49 25 29 3d 30 20  |.. price%(I%)=0 |
000005e0  e5 20 8d 44 5c 43 0d 03  34 1c 6d 69 6e 25 3d 9a  |. .D\C..4.min%=.|
000005f0  23 46 49 4c 45 25 2a 32  35 36 2b 9a 23 46 49 4c  |#FILE%*256+.#FIL|
00000600  45 25 0d 03 3e 23 e7 20  6d 69 6e 25 3e 70 72 69  |E%..>#. min%>pri|
00000610  63 65 25 28 49 25 29 20  f2 75 70 64 61 74 65 6d  |ce%(I%) .updatem|
00000620  61 78 6d 69 6e 0d 03 48  1c 6d 61 78 25 3d 9a 23  |axmin..H.max%=.#|
00000630  46 49 4c 45 25 2a 32 35  36 2b 9a 23 46 49 4c 45  |FILE%*256+.#FILE|
00000640  25 0d 03 52 23 e7 20 6d  61 78 25 3c 70 72 69 63  |%..R#. max%<pric|
00000650  65 25 28 49 25 29 20 f2  75 70 64 61 74 65 6d 61  |e%(I%) .updatema|
00000660  78 6d 69 6e 0d 03 5c 05  ed 0d 03 66 05 e1 0d 03  |xmin..\....f....|
00000670  70 05 3a 0d 03 7a 12 dd  f2 75 70 64 61 74 65 6d  |p.:..z...updatem|
00000680  61 78 6d 69 6e 0d 03 84  15 cf 23 46 49 4c 45 25  |axmin.....#FILE%|
00000690  3d 8f 23 46 49 4c 45 25  2d 32 0d 03 8e 1c d5 23  |=.#FILE%-2.....#|
000006a0  46 49 4c 45 25 2c 70 72  69 63 65 25 28 49 25 29  |FILE%,price%(I%)|
000006b0  20 81 20 32 35 36 0d 03  98 1c d5 23 46 49 4c 45  | . 256.....#FILE|
000006c0  25 2c 70 72 69 63 65 25  28 49 25 29 20 83 20 32  |%,price%(I%) . 2|
000006d0  35 36 0d 03 a2 05 e1 0d  03 ac 05 3a 0d 03 b6 15  |56.........:....|
000006e0  dd f2 63 68 61 6e 67 65  5f 64 61 74 65 28 43 25  |..change_date(C%|
000006f0  29 0d 03 c0 23 64 69 73  63 70 74 72 25 3d 64 69  |)...#discptr%=di|
00000700  73 63 70 74 72 25 2b 28  43 25 2a 6e 64 61 74 61  |scptr%+(C%*ndata|
00000710  25 2a 32 29 0d 03 ca 38  e7 20 64 69 73 63 70 74  |%*2)...8. discpt|
00000720  72 25 3c 6d 69 6e 72 65  63 6f 72 64 25 20 64 69  |r%<minrecord% di|
00000730  73 63 70 74 72 25 3d 6d  69 6e 72 65 63 6f 72 64  |scptr%=minrecord|
00000740  25 3a ef 37 3a f2 66 69  6e 69 73 68 0d 03 d4 78  |%:.7:.finish...x|
00000750  e7 20 64 69 73 63 70 74  72 25 3e 28 a2 23 46 49  |. discptr%>(.#FI|
00000760  4c 45 25 29 2d 6e 64 61  74 61 25 2a 32 20 64 69  |LE%)-ndata%*2 di|
00000770  73 63 70 74 72 25 3d 64  69 73 63 70 74 72 25 2d  |scptr%=discptr%-|
00000780  28 43 25 2a 6e 64 61 74  61 25 2a 32 29 3a 44 3d  |(C%*ndata%*2):D=|
00000790  31 3a 4d 3d 31 3a 59 3d  79 65 61 72 25 28 56 25  |1:M=1:Y=year%(V%|
000007a0  29 2b 31 3a f2 6e 6f 74  66 6f 75 6e 64 3a f2 63  |)+1:.notfound:.c|
000007b0  68 65 63 6b 5f 61 6e 64  5f 6f 70 65 6e 5f 66 69  |heck_and_open_fi|
000007c0  6c 65 3a e1 0d 03 de 0f  f2 61 64 6a 75 73 74 64  |le:......adjustd|
000007d0  61 74 65 0d 03 e8 05 e1  0d 03 f2 05 3a 0d 03 fc  |ate.........:...|
000007e0  10 dd f2 61 64 6a 75 73  74 64 61 74 65 0d 04 06  |...adjustdate...|
000007f0  05 f5 0d 04 10 0a 44 3d  44 2b 43 25 0d 04 1a 05  |......D=D+C%....|
00000800  f5 0d 04 24 1f e7 20 a4  76 61 6c 69 64 61 74 65  |...$.. .validate|
00000810  28 44 2c 4d 2c 59 29 3d  30 20 44 3d 44 2b 43 25  |(D,M,Y)=0 D=D+C%|
00000820  0d 04 2e 25 e7 20 44 3e  33 31 20 44 3d 31 3a 4d  |...%. D>31 D=1:M|
00000830  3d 4d 2b 31 3a e7 20 4d  3e 31 32 20 4d 3d 31 3a  |=M+1:. M>12 M=1:|
00000840  59 3d 59 2b 31 0d 04 38  25 e7 20 44 3c 31 20 44  |Y=Y+1..8%. D<1 D|
00000850  3d 33 31 3a 4d 3d 4d 2d  31 3a e7 20 4d 3c 31 20  |=31:M=M-1:. M<1 |
00000860  4d 3d 31 32 3a 59 3d 59  2d 31 0d 04 42 19 fd 20  |M=12:Y=Y-1..B.. |
00000870  a4 76 61 6c 69 64 61 74  65 28 44 2c 4d 2c 59 29  |.validate(D,M,Y)|
00000880  3c 3e 30 0d 04 4c 0e 44  41 59 3d 44 41 59 2b 43  |<>0..L.DAY=DAY+C|
00000890  25 0d 04 56 11 e7 20 44  41 59 3c 31 20 44 41 59  |%..V.. DAY<1 DAY|
000008a0  3d 37 0d 04 60 11 e7 20  44 41 59 3e 37 20 44 41  |=7..`.. DAY>7 DA|
000008b0  59 3d 31 0d 04 6a 0b fd  20 44 41 59 3c 36 0d 04  |Y=1..j.. DAY<6..|
000008c0  74 05 e1 0d 04 7e 05 3a  0d 04 88 4d dd a4 76 61  |t....~.:...M..va|
000008d0  6c 69 64 61 74 65 28 44  2c 4d 2c 59 29 3a 3d 44  |lidate(D,M,Y):=D|
000008e0  2a 4d 2a 28 4d 3c 31 33  29 2a 28 44 3c 33 31 2b  |*M*(M<13)*(D<31+|
000008f0  28 28 4d 2b 28 4d 3e 37  29 29 80 20 31 29 2b 28  |((M+(M>7)). 1)+(|
00000900  4d 3d 32 29 2a 28 32 2b  28 28 59 20 80 20 33 29  |M=2)*(2+((Y . 3)|
00000910  3d 30 29 29 29 0d 04 92  05 3a 0d 04 9c 19 dd f2  |=0)))....:......|
00000920  63 68 65 63 6b 5f 61 6e  64 5f 6f 70 65 6e 5f 66  |check_and_open_f|
00000930  69 6c 65 0d 04 a6 05 f5  0d 04 b0 1f 46 49 4c 45  |ile.........FILE|
00000940  25 3d ad 28 c3 28 79 65  61 72 25 28 56 25 29 2a  |%=.(.(year%(V%)*|
00000950  31 30 2b 56 25 29 29 0d  04 ba 0b 2a 46 58 32 31  |10+V%))....*FX21|
00000960  2c 30 0d 04 c4 07 d9 23  30 0d 04 ce 23 e7 20 46  |,0.....#0...#. F|
00000970  49 4c 45 25 3d 30 20 59  3d 79 65 61 72 25 28 56  |ILE%=0 Y=year%(V|
00000980  25 29 3a f2 6e 6f 74 66  6f 75 6e 64 0d 04 d8 0e  |%):.notfound....|
00000990  fd 20 46 49 4c 45 25 3c  3e 30 0d 04 e2 1f 46 49  |. FILE%<>0....FI|
000009a0  4c 45 25 3d ad 28 c3 28  79 65 61 72 25 28 56 25  |LE%=.(.(year%(V%|
000009b0  29 2a 31 30 2b 56 25 29  29 0d 04 ec 0d cf 23 46  |)*10+V%)).....#F|
000009c0  49 4c 45 25 3d 30 0d 04  f6 13 e3 20 49 25 3d 32  |ILE%=0..... I%=2|
000009d0  b8 6e 64 61 74 61 25 2b  31 0d 05 00 0d 73 24 28  |.ndata%+1....s$(|
000009e0  49 25 29 3d 22 22 0d 05  0a 0c e3 20 4a 25 3d 31  |I%)=""..... J%=1|
000009f0  b8 37 0d 05 14 0e 42 25  3d 9a 23 46 49 4c 45 25  |.7....B%=.#FILE%|
00000a00  0d 05 1e 1a e7 20 42 25  3c 33 32 20 84 20 42 25  |..... B%<32 . B%|
00000a10  3e 31 32 36 20 42 25 3d  33 32 0d 05 28 17 73 24  |>126 B%=32..(.s$|
00000a20  28 49 25 29 3d 73 24 28  49 25 29 2b bd 28 42 25  |(I%)=s$(I%)+.(B%|
00000a30  29 0d 05 32 05 ed 0d 05  3c 05 ed 0d 05 46 27 f4  |)..2....<....F'.|
00000a40  20 47 45 54 20 43 55 52  52 45 4e 54 20 44 41 54  | GET CURRENT DAT|
00000a50  45 20 41 4e 44 20 44 49  53 43 20 50 4f 49 4e 54  |E AND DISC POINT|
00000a60  45 52 0d 05 50 18 cf 23  46 49 4c 45 25 3d 63 75  |ER..P..#FILE%=cu|
00000a70  72 72 65 6e 74 64 61 74  65 25 0d 05 5a 0d 44 3d  |rrentdate%..Z.D=|
00000a80  9a 23 46 49 4c 45 25 0d  05 64 0d 4d 3d 9a 23 46  |.#FILE%..d.M=.#F|
00000a90  49 4c 45 25 0d 05 6e 1b  59 3d 28 9a 23 46 49 4c  |ILE%..n.Y=(.#FIL|
00000aa0  45 25 29 2a 32 35 36 2b  9a 23 46 49 4c 45 25 0d  |E%)*256+.#FILE%.|
00000ab0  05 78 0f 44 41 59 3d 9a  23 46 49 4c 45 25 0d 05  |.x.DAY=.#FILE%..|
00000ac0  82 22 64 69 73 63 70 74  72 25 3d 28 9a 23 46 49  |."discptr%=(.#FI|
00000ad0  4c 45 25 29 2a 32 35 36  2b 9a 23 46 49 4c 45 25  |LE%)*256+.#FILE%|
00000ae0  0d 05 8c 08 53 25 3d b9  0d 05 96 05 e1 0d 05 a0  |....S%=.........|
00000af0  05 3a 0d 05 aa 0b dd f2  61 75 74 6f 31 0d 05 b4  |.:......auto1...|
00000b00  0c 54 45 58 54 24 3d 22  22 0d 05 be 08 5a 25 3d  |.TEXT$=""....Z%=|
00000b10  30 0d 05 c8 0a 2a 54 54  58 4f 4e 0d 05 d2 09 2a  |0....*TTXON....*|
00000b20  42 42 43 31 0d 05 dc 08  2a 48 4f 4e 0d 05 e6 05  |BBC1....*HON....|
00000b30  f5 0d 05 f0 05 f5 0d 05  fa 0d 2a 50 41 47 45 20  |..........*PAGE |
00000b40  31 33 30 0d 06 04 09 f2  64 61 74 61 0d 06 0e 0c  |130.....data....|
00000b50  fd 20 a4 63 72 63 3c 32  0d 06 18 1b f1 8a 30 2c  |. .crc<2......0,|
00000b60  39 29 bd 31 33 31 3b 27  bd 31 33 31 3b 27 bd 31  |9).131;'.131;'.1|
00000b70  33 31 3b 0d 06 22 40 e7  20 ac 20 a4 63 6c 6f 73  |31;.."@. . .clos|
00000b80  65 20 f1 8a 34 2c 31 30  29 22 57 61 69 74 69 6e  |e ..4,10)"Waitin|
00000b90  67 20 75 6e 74 69 6c 20  63 6c 6f 73 65 20 6f 66  |g until close of|
00000ba0  20 62 75 73 69 6e 65 73  73 2e 22 3a f2 62 6f 72  | business.":.bor|
00000bb0  64 65 72 0d 06 2c 0c fd  20 a4 63 6c 6f 73 65 0d  |der..,.. .close.|
00000bc0  06 36 05 db 0d 06 40 05  f5 0d 06 4a 0e fd 20 a4  |.6....@....J.. .|
00000bd0  64 61 74 65 5f 6f 6b 0d  06 54 0e f2 6c 6f 61 64  |date_ok..T..load|
00000be0  6e 61 6d 65 73 0d 06 5e  13 e3 20 49 25 3d 30 b8  |names..^.. I%=0.|
00000bf0  6e 64 61 74 61 25 2d 31  0d 06 68 0c 46 25 28 49  |ndata%-1..h.F%(I|
00000c00  25 29 3d a3 0d 06 72 1c  f1 8a 30 2c 49 25 2b 32  |%)=...r...0,I%+2|
00000c10  29 bd 31 33 31 3b 53 48  41 52 45 24 28 49 25 29  |).131;SHARE$(I%)|
00000c20  0d 06 7c 05 ed 0d 06 86  26 f1 8a 31 38 2c 31 30  |..|.....&..18,10|
00000c30  29 bd 31 33 31 3b 22 45  6e 74 65 72 69 6e 67 20  |).131;"Entering |
00000c40  64 61 74 61 20 66 6f 72  3a 2d 22 0d 06 90 1e f1  |data for:-".....|
00000c50  8a 32 30 2c 31 33 29 bd  31 33 31 3b 44 3b 22 2f  |.20,13).131;D;"/|
00000c60  22 3b 4d 3b 22 2f 22 3b  59 0d 06 9a 05 f5 0d 06  |";M;"/";Y.......|
00000c70  a4 05 f5 0d 06 ae 05 f5  0d 06 b8 0d 2a 50 41 47  |............*PAG|
00000c80  45 20 31 33 30 0d 06 c2  09 f2 64 61 74 61 0d 06  |E 130.....data..|
00000c90  cc 0c fd 20 a4 63 72 63  3c 32 0d 06 d6 0c fd 20  |... .crc<2..... |
00000ca0  a4 63 6c 6f 73 65 0d 06  e0 10 50 41 25 3d a4 73  |.close....PA%=.s|
00000cb0  75 62 70 61 67 65 0d 06  ea 1f f1 8a 32 35 2c 31  |ubpage......25,1|
00000cc0  29 bd 31 33 30 3b 22 53  75 62 2d 70 61 67 65 20  |).130;"Sub-page |
00000cd0  22 3b 50 41 25 0d 06 f4  08 d6 6d 63 25 0d 06 fe  |";PA%.....mc%...|
00000ce0  0d e3 20 52 25 3d 35 b8  31 39 0d 07 08 18 f2 67  |.. R%=5.19.....g|
00000cf0  65 74 74 65 78 74 28 62  6c 6f 63 6b 33 25 2c 52  |ettext(block3%,R|
00000d00  25 29 0d 07 12 0b f2 73  65 61 72 63 68 0d 07 1c  |%).....search...|
00000d10  05 ed 0d 07 26 0f 53 55  42 25 28 50 41 25 29 3d  |....&.SUB%(PA%)=|
00000d20  b9 0d 07 30 41 fd 5a 25  3d 32 30 20 84 20 53 55  |...0A.Z%=20 . SU|
00000d30  42 25 28 31 29 2b 53 55  42 25 28 32 29 2b 53 55  |B%(1)+SUB%(2)+SU|
00000d40  42 25 28 33 29 2b 53 55  42 25 28 34 29 2b 53 55  |B%(3)+SUB%(4)+SU|
00000d50  42 25 28 35 29 2b 53 55  42 25 28 36 29 3d 28 2d  |B%(5)+SUB%(6)=(-|
00000d60  36 29 0d 07 3a 0b f1 8a  30 2c 32 31 29 0d 07 44  |6)..:...0,21)..D|
00000d70  0b 2a 54 54 58 4f 46 46  0d 07 4e 05 e1 0d 07 58  |.*TTXOFF..N....X|
00000d80  05 3a 0d 07 62 0c dd f2  62 6f 72 64 65 72 0d 07  |.:..b...border..|
00000d90  6c 0c e3 20 4a 25 3d 30  b8 31 0d 07 76 1c e7 20  |l.. J%=0.1..v.. |
00000da0  4a 25 3d 30 20 54 31 24  3d 22 5f 22 20 8b 20 54  |J%=0 T1$="_" . T|
00000db0  31 24 3d 22 20 22 0d 07  80 1c e7 20 4a 25 3d 30  |1$=" "..... J%=0|
00000dc0  20 54 32 24 3d 22 49 22  20 8b 20 54 32 24 3d 22  | T2$="I" . T2$="|
00000dd0  20 22 0d 07 8a 0f e3 20  49 25 3d 32 20 b8 20 33  | "..... I%=2 . 3|
00000de0  37 0d 07 94 0a f2 64 65  6c 61 79 0d 07 9e 10 f1  |7.....delay.....|
00000df0  8a 49 25 2c 31 31 29 54  31 24 3b 0d 07 a8 05 ed  |.I%,11)T1$;.....|
00000e00  0d 07 b2 10 f1 8a 33 37  2c 31 30 29 54 32 24 3b  |......37,10)T2$;|
00000e10  0d 07 bc 14 e3 20 49 25  3d 33 37 20 b8 20 32 20  |..... I%=37 . 2 |
00000e20  88 20 2d 31 0d 07 c6 0a  f2 64 65 6c 61 79 0d 07  |. -1.....delay..|
00000e30  d0 0f f1 8a 49 25 2c 39  29 54 31 24 3b 0d 07 da  |....I%,9)T1$;...|
00000e40  05 ed 0d 07 e4 0f f1 8a  32 2c 31 30 29 54 32 24  |........2,10)T2$|
00000e50  3b 0d 07 ee 05 ed 0d 07  f8 05 e1 0d 08 02 05 3a  |;..............:|
00000e60  0d 08 0c 0a dd f2 64 61  74 61 0d 08 16 1d 24 6c  |......data....$l|
00000e70  69 6e 65 3d 22 44 41 54  41 20 22 2b c3 7e 28 62  |ine="DATA "+.~(b|
00000e80  6c 6f 63 6b 33 25 29 0d  08 20 11 58 25 3d 6c 69  |lock3%).. .X%=li|
00000e90  6e 65 20 83 20 32 35 36  0d 08 2a 11 59 25 3d 6c  |ne . 256..*.Y%=l|
00000ea0  69 6e 65 20 81 20 32 35  36 0d 08 34 0a d6 26 46  |ine . 256..4..&F|
00000eb0  46 46 37 0d 08 3e 05 e1  0d 08 48 05 3a 0d 08 52  |FF7..>....H.:..R|
00000ec0  0b dd f2 61 75 74 6f 30  0d 08 5c 0c 54 45 58 54  |...auto0..\.TEXT|
00000ed0  24 3d 22 22 0d 08 66 0a  2a 54 54 58 4f 4e 0d 08  |$=""..f.*TTXON..|
00000ee0  70 09 2a 42 42 43 31 0d  08 7a 08 2a 48 4f 4e 0d  |p.*BBC1..z.*HON.|
00000ef0  08 84 0d 2a 50 41 47 45  20 31 32 35 0d 08 8e 05  |...*PAGE 125....|
00000f00  f5 0d 08 98 0e fd 20 a4  64 61 74 65 5f 6f 6b 0d  |...... .date_ok.|
00000f10  08 a2 1b f1 8a 35 2c 31  32 29 bd 31 33 31 3b 22  |.....5,12).131;"|
00000f20  46 54 2d 53 45 20 31 30  30 22 0d 08 ac 05 f5 0d  |FT-SE 100"......|
00000f30  08 b6 0d 2a 50 41 47 45  20 31 32 35 0d 08 c0 09  |...*PAGE 125....|
00000f40  f2 64 61 74 61 0d 08 ca  16 73 75 62 5f 70 61 67  |.data....sub_pag|
00000f50  65 25 3d a4 73 75 62 70  61 67 65 0d 08 d4 25 f1  |e%=.subpage...%.|
00000f60  8a 32 35 2c 31 29 bd 31  33 30 3b 22 53 75 62 2d  |.25,1).130;"Sub-|
00000f70  70 61 67 65 20 22 3b 73  75 62 5f 70 61 67 65 25  |page ";sub_page%|
00000f80  0d 08 de 1a fd 20 a4 63  72 63 3c 32 20 80 20 73  |..... .crc<2 . s|
00000f90  75 62 5f 70 61 67 65 25  3d 32 0d 08 e8 08 d6 6d  |ub_page%=2.....m|
00000fa0  63 25 0d 08 f2 09 4c 25  3d 32 31 0d 08 fc 18 f2  |c%....L%=21.....|
00000fb0  67 65 74 74 65 78 74 28  62 6c 6f 63 6b 33 25 2c  |gettext(block3%,|
00000fc0  4c 25 29 0d 09 06 0c f2  73 65 61 72 63 68 31 0d  |L%).....search1.|
00000fd0  09 10 0b 2a 54 54 58 4f  46 46 0d 09 1a 05 e1 0d  |...*TTXOFF......|
00000fe0  09 24 05 3a 0d 09 2e 1c  dd f2 67 65 74 74 65 78  |.$.:......gettex|
00000ff0  74 28 61 64 64 72 65 73  73 25 2c 72 6f 77 25 29  |t(address%,row%)|
00001000  0d 09 38 11 54 45 58 54  24 3d 22 22 3a 49 25 3d  |..8.TEXT$="":I%=|
00001010  30 0d 09 42 05 f5 0d 09  4c 1d 70 6f 69 6e 74 65  |0..B....L.pointe|
00001020  72 25 3d 61 64 64 72 65  73 73 25 2b 31 2b 49 25  |r%=address%+1+I%|
00001030  2a 34 32 0d 09 56 0b 49  25 3d 49 25 2b 31 0d 09  |*42..V.I%=I%+1..|
00001040  60 1c fd 20 3f 70 6f 69  6e 74 65 72 25 3d 72 6f  |`.. ?pointer%=ro|
00001050  77 25 20 84 20 49 25 3d  32 34 0d 09 6a 2e e7 20  |w% . I%=24..j.. |
00001060  49 25 3c 32 34 20 70 6f  69 6e 74 65 72 25 3f 34  |I%<24 pointer%?4|
00001070  31 3d 31 33 3a 54 45 58  54 24 3d 24 28 70 6f 69  |1=13:TEXT$=$(poi|
00001080  6e 74 65 72 25 2b 32 29  0d 09 74 05 e1 0d 09 7e  |nter%+2)..t....~|
00001090  05 3a 0d 09 88 0c dd f2  73 65 61 72 63 68 0d 09  |.:......search..|
000010a0  92 13 e7 20 53 55 42 25  28 50 41 25 29 20 8c 20  |... SUB%(PA%) . |
000010b0  e1 0d 09 9c 14 e3 20 4a  25 3d 31 20 b8 20 32 31  |...... J%=1 . 21|
000010c0  20 88 20 32 30 0d 09 a6  0d e3 20 49 25 3d 30 b8  | . 20..... I%=0.|
000010d0  31 39 0d 09 b0 21 e7 20  53 48 41 52 45 24 28 49  |19...!. SHARE$(I|
000010e0  25 29 3d 22 20 20 20 20  20 20 20 22 20 e5 20 8d  |%)="       " . .|
000010f0  64 44 49 0d 09 ba 24 e7  20 53 48 41 52 45 24 28  |dDI...$. SHARE$(|
00001100  49 25 29 3d c1 54 45 58  54 24 2c 4a 25 2c 37 29  |I%)=.TEXT$,J%,7)|
00001110  20 f2 66 6f 75 6e 64 0d  09 c4 05 ed 0d 09 ce 05  | .found.........|
00001120  ed 0d 09 d8 05 e1 0d 09  e2 05 3a 0d 09 ec 0d dd  |..........:.....|
00001130  f2 73 65 61 72 63 68 31  0d 09 f6 1d 70 72 69 63  |.search1....pric|
00001140  65 25 28 30 29 3d bb 28  c1 54 45 58 54 24 2c 32  |e%(0)=.(.TEXT$,2|
00001150  36 2c 35 29 29 0d 0a 00  15 f1 8a 31 36 2c 31 32  |6,5))......16,12|
00001160  29 70 72 69 63 65 25 28  30 29 0d 0a 0a 0b 5a 25  |)price%(0)....Z%|
00001170  3d 5a 25 2b 31 0d 0a 14  05 e1 0d 0a 1e 05 3a 0d  |=Z%+1.........:.|
00001180  0a 28 0b dd f2 66 6f 75  6e 64 0d 0a 32 23 e7 20  |.(...found..2#. |
00001190  46 25 28 49 25 29 3d a3  20 5a 25 3d 5a 25 2b 31  |F%(I%)=. Z%=Z%+1|
000011a0  3a 46 25 28 49 25 29 3d  b9 3a 8b 20 e1 0d 0a 3c  |:F%(I%)=.:. ...<|
000011b0  24 f1 8a 30 2c 31 29 bd  31 32 39 3b 22 46 6f 75  |$..0,1).129;"Fou|
000011c0  6e 64 20 22 3b 5a 25 3b  22 20 73 68 61 72 65 73  |nd ";Z%;" shares|
000011d0  22 0d 0a 46 0b 53 25 3d  4a 25 2b 36 0d 0a 50 05  |"..F.S%=J%+6..P.|
000011e0  f5 0d 0a 5a 0b 53 25 3d  53 25 2b 31 0d 0a 64 2d  |...Z.S%=S%+1..d-|
000011f0  fd 20 97 28 c1 54 45 58  54 24 2c 53 25 2c 31 29  |. .(.TEXT$,S%,1)|
00001200  29 3e 34 37 20 80 20 97  28 c1 54 45 58 54 24 2c  |)>47 . .(.TEXT$,|
00001210  53 25 2c 31 29 29 3c 35  38 0d 0a 6e 09 45 25 3d  |S%,1))<58..n.E%=|
00001220  53 25 0d 0a 78 05 f5 0d  0a 82 0b 45 25 3d 45 25  |S%..x......E%=E%|
00001230  2b 31 0d 0a 8c 16 fd 20  c1 54 45 58 54 24 2c 45  |+1..... .TEXT$,E|
00001240  25 2c 31 29 3d 22 20 22  0d 0a 96 0b 45 25 3d 45  |%,1)=" "....E%=E|
00001250  25 2d 31 0d 0a a0 24 70  72 69 63 65 25 28 49 25  |%-1...$price%(I%|
00001260  29 3d bb 28 c1 54 45 58  54 24 2c 53 25 2c 45 25  |)=.(.TEXT$,S%,E%|
00001270  2d 53 25 2b 31 29 29 0d  0a aa 1d f1 8a 31 30 2c  |-S%+1))......10,|
00001280  49 25 2b 32 29 bd 31 33  31 3b 70 72 69 63 65 25  |I%+2).131;price%|
00001290  28 49 25 29 0d 0a b4 05  e1 0d 0a be 05 3a 0d 0a  |(I%).........:..|
000012a0  c8 0b dd a4 63 6c 6f 73  65 0d 0a d2 43 f4 20 4c  |....close...C. L|
000012b0  6f 6f 6b 20 66 6f 72 20  74 68 65 20 74 65 78 74  |ook for the text|
000012c0  20 73 74 72 69 6e 67 20  22 43 6c 6f 73 65 22 20  | string "Close" |
000012d0  73 74 61 72 74 69 6e 67  20 61 74 20 6c 6f 63 61  |starting at loca|
000012e0  74 69 6f 6e 20 62 6c 6f  63 6b 33 25 0d 0a dc 1f  |tion block3%....|
000012f0  e3 20 4a 25 3d 62 6c 6f  63 6b 33 25 20 b8 20 62  |. J%=block3% . b|
00001300  6c 6f 63 6b 33 25 2b 26  38 30 30 0d 0a e6 0c 54  |lock3%+&800....T|
00001310  45 58 54 24 3d 22 22 0d  0a f0 12 e3 20 49 25 3d  |EXT$=""..... I%=|
00001320  4a 25 20 b8 20 4a 25 2b  34 0d 0a fa 1c 54 45 58  |J% . J%+4....TEX|
00001330  54 24 3d 54 45 58 54 24  2b bd 28 3f 49 25 20 80  |T$=TEXT$+.(?I% .|
00001340  20 31 32 37 29 0d 0b 04  05 ed 0d 0b 0e 2b e7 20  | 127)........+. |
00001350  54 45 58 54 24 3d 22 43  6c 6f 73 65 22 20 84 20  |TEXT$="Close" . |
00001360  54 45 58 54 24 3d 22 63  6c 6f 73 65 22 4a 25 3d  |TEXT$="close"J%=|
00001370  26 46 46 46 46 0d 0b 18  05 ed 0d 0b 22 2b e7 20  |&FFFF......."+. |
00001380  54 45 58 54 24 3d 22 43  6c 6f 73 65 22 20 84 20  |TEXT$="Close" . |
00001390  54 45 58 54 24 3d 22 63  6c 6f 73 65 22 20 3d b9  |TEXT$="close" =.|
000013a0  20 8b 20 3d a3 0d 0b 2c  05 3a 0d 0b 36 0d dd a4  | . =...,.:..6...|
000013b0  64 61 74 65 5f 6f 6b 0d  0b 40 14 f4 22 81 44 41  |date_ok..@..".DA|
000013c0  54 45 20 57 49 54 48 20  41 54 53 0d 0b 4a 0f d1  |TE WITH ATS..J..|
000013d0  3d 30 3a f5 fd 91 3e 31  32 30 0d 0b 54 3b 41 25  |=0:...>120..T;A%|
000013e0  3d 26 37 41 3a 58 25 3d  62 6c 6f 63 6b 31 25 83  |=&7A:X%=block1%.|
000013f0  32 35 36 3a 59 25 3d 62  6c 6f 63 6b 31 25 81 32  |256:Y%=block1%.2|
00001400  35 36 3a 3f 62 6c 6f 63  6b 31 25 3d 31 35 3a d6  |56:?block1%=15:.|
00001410  26 46 46 46 31 0d 0b 5e  1a 42 42 31 24 3d c2 c3  |&FFF1..^.BB1$=..|
00001420  7e 28 62 6c 6f 63 6b 31  25 3f 38 29 2c 31 29 0d  |~(block1%?8),1).|
00001430  0b 68 30 42 42 32 24 3d  c3 7e 28 62 6c 6f 63 6b  |.h0BB2$=.~(block|
00001440  31 25 3f 39 29 3a e7 20  a9 28 42 42 32 24 29 3d  |1%?9):. .(BB2$)=|
00001450  31 20 42 42 32 24 3d 22  30 22 2b 42 42 32 24 0d  |1 BB2$="0"+BB2$.|
00001460  0b 72 31 42 42 33 24 3d  c3 7e 28 62 6c 6f 63 6b  |.r1BB3$=.~(block|
00001470  31 25 3f 31 30 29 3a e7  20 a9 28 42 42 33 24 29  |1%?10):. .(BB3$)|
00001480  3d 31 20 42 42 33 24 3d  22 30 22 2b 42 42 33 24  |=1 BB3$="0"+BB3$|
00001490  0d 0b 7c 18 4a 44 3d bb  28 42 42 31 24 2b 42 42  |..|.JD=.(BB1$+BB|
000014a0  32 24 2b 42 42 33 24 29  0d 0b 86 1f 79 25 3d 28  |2$+BB3$)....y%=(|
000014b0  31 30 30 2a 28 4a 44 2d  31 35 30 37 38 2e 32 29  |100*(JD-15078.2)|
000014c0  29 81 33 36 35 32 35 0d  0b 90 2b 6d 25 3d a8 28  |).36525...+m%=.(|
000014d0  28 4a 44 2d 31 34 39 35  36 2e 31 2d a8 28 33 36  |(JD-14956.1-.(36|
000014e0  35 2e 32 35 2a 79 25 29  29 2f 33 30 2e 36 30 30  |5.25*y%))/30.600|
000014f0  31 29 0d 0b 9a 3c 64 25  3d 4a 44 2d 31 34 39 35  |1)...<d%=JD-1495|
00001500  36 2d a8 28 33 36 35 2e  32 35 2a 79 25 29 2d a8  |6-.(365.25*y%)-.|
00001510  28 33 30 2e 36 2a 6d 25  29 3a 4b 3d a8 28 30 2e  |(30.6*m%):K=.(0.|
00001520  37 2b 28 31 2f 28 31 37  2d 6d 25 29 29 29 0d 0b  |7+(1/(17-m%)))..|
00001530  a4 10 6d 25 3d 6d 25 2d  31 2d 31 32 2a 4b 0d 0b  |..m%=m%-1-12*K..|
00001540  ae 0e 79 25 3d 79 25 2b  31 39 30 30 0d 0b b8 1a  |..y%=y%+1900....|
00001550  64 64 25 3d 79 25 2a 31  30 30 30 30 2b 6d 25 2a  |dd%=y%*10000+m%*|
00001560  31 30 30 2b 64 25 0d 0b  c2 05 f4 0d 0b cc 1a f4  |100+d%..........|
00001570  20 47 65 74 20 68 6f 75  72 20 66 72 6f 6d 20 43  | Get hour from C|
00001580  45 45 46 41 58 0d 0b d6  05 f4 0d 0b e0 0f 3f 62  |EEFAX.........?b|
00001590  6c 6f 63 6b 31 25 3d 32  31 0d 0b ea 14 58 25 3d  |lock1%=21....X%=|
000015a0  62 6c 6f 63 6b 31 25 20  83 20 32 35 36 0d 0b f4  |block1% . 256...|
000015b0  14 59 25 3d 62 6c 6f 63  6b 31 25 20 81 20 32 35  |.Y%=block1% . 25|
000015c0  36 0d 0b fe 0a 41 25 3d  26 37 41 0d 0c 08 05 f5  |6....A%=&7A.....|
000015d0  0d 0c 12 0a d6 26 46 46  46 31 0d 0c 1c 12 fd 20  |.....&FFF1..... |
000015e0  62 6c 6f 63 6b 31 25 3f  31 30 3d 30 0d 0c 26 24  |block1%?10=0..&$|
000015f0  68 72 25 3d bb 28 bd 28  62 6c 6f 63 6b 31 25 3f  |hr%=.(.(block1%?|
00001600  31 29 2b bd 28 62 6c 6f  63 6b 31 25 3f 32 29 29  |1)+.(block1%?2))|
00001610  0d 0c 30 16 e7 20 68 72  25 3c 31 30 20 64 64 25  |..0.. hr%<10 dd%|
00001620  3d 64 64 25 2d 31 0d 0c  3a 05 f5 0d 0c 44 16 44  |=dd%-1..:....D.D|
00001630  25 3d 59 2a 31 30 30 30  30 2b 4d 2a 31 30 30 2b  |%=Y*10000+M*100+|
00001640  44 0d 0c 4e 1c e7 20 44  25 3c 64 64 25 20 f2 63  |D..N.. D%<dd% .c|
00001650  68 61 6e 67 65 5f 64 61  74 65 28 31 29 0d 0c 58  |hange_date(1)..X|
00001660  0d fd 20 44 25 3e 3d 64  64 25 0d 0c 62 05 f5 0d  |.. D%>=dd%..b...|
00001670  0c 6c 16 44 25 3d 59 2a  31 30 30 30 30 2b 4d 2a  |.l.D%=Y*10000+M*|
00001680  31 30 30 2b 44 0d 0c 76  1d e7 20 44 25 3e 64 64  |100+D..v.. D%>dd|
00001690  25 20 f2 63 68 61 6e 67  65 5f 64 61 74 65 28 2d  |% .change_date(-|
000016a0  31 29 0d 0c 80 0d fd 20  44 25 3c 3d 64 64 25 0d  |1)..... D%<=dd%.|
000016b0  0c 8a 06 3d b9 0d 0c 94  05 3a 0d 0c 9e 0c dd f2  |...=.....:......|
000016c0  73 74 61 74 75 73 0d 0c  a8 05 f5 0d 0c b2 0f 3f  |status.........?|
000016d0  62 6c 6f 63 6b 31 25 3d  31 37 0d 0c bc 11 62 6c  |block1%=17....bl|
000016e0  6f 63 6b 31 25 3f 31 3d  26 46 45 0d 0c c6 14 58  |ock1%?1=&FE....X|
000016f0  25 3d 62 6c 6f 63 6b 31  25 20 83 20 32 35 36 0d  |%=block1% . 256.|
00001700  0c d0 14 59 25 3d 62 6c  6f 63 6b 31 25 20 81 20  |...Y%=block1% . |
00001710  32 35 36 0d 0c da 0a 41  25 3d 26 37 41 0d 0c e4  |256....A%=&7A...|
00001720  0a d6 26 46 46 46 31 0d  0c ee 63 e7 20 62 6c 6f  |..&FFF1...c. blo|
00001730  63 6b 31 25 3f 31 3d 31  20 f1 8a 30 2c 31 30 29  |ck1%?1=1 ..0,10)|
00001740  bd 31 32 39 3b 22 54 65  6c 65 74 65 78 74 20 41  |.129;"Teletext A|
00001750  64 61 70 74 6f 72 20 6f  6e 2c 20 62 75 74 20 6e  |daptor on, but n|
00001760  6f 20 73 69 67 6e 61 6c  2e 22 27 27 bd 31 32 39  |o signal."''.129|
00001770  3b 22 43 68 65 63 6b 20  74 75 6e 69 6e 67 20 6f  |;"Check tuning o|
00001780  72 20 61 65 72 69 61 6c  2e 22 0d 0c f8 83 e7 20  |r aerial."..... |
00001790  62 6c 6f 63 6b 31 25 3f  31 3d 32 20 f1 8a 30 2c  |block1%?1=2 ..0,|
000017a0  31 30 29 bd 31 32 39 3b  22 54 65 6c 65 74 65 78  |10).129;"Teletex|
000017b0  74 20 41 64 61 70 74 6f  72 20 63 6f 6e 6e 65 63  |t Adaptor connec|
000017c0  74 65 64 2c 22 27 bd 31  32 39 3b 22 62 75 74 20  |ted,"'.129;"but |
000017d0  73 77 69 74 63 68 65 64  20 6f 66 66 2e 22 27 bd  |switched off."'.|
000017e0  31 32 39 3b 22 53 77 69  74 63 68 20 6f 6e 2c 20  |129;"Switch on, |
000017f0  70 72 65 73 73 20 42 52  45 41 4b 20 61 6e 64 20  |press BREAK and |
00001800  73 74 61 72 74 20 61 67  61 69 6e 2e 22 0d 0d 02  |start again."...|
00001810  40 e7 20 62 6c 6f 63 6b  31 25 3f 31 3d 26 46 46  |@. block1%?1=&FF|
00001820  20 f1 8a 30 2c 31 30 29  bd 31 32 39 3b 22 4e 6f  | ..0,10).129;"No|
00001830  20 54 65 6c 65 74 65 78  74 20 41 64 61 70 74 6f  | Teletext Adapto|
00001840  72 20 63 6f 6e 6e 65 63  74 65 64 2e 22 0d 0d 0c  |r connected."...|
00001850  59 e7 20 62 6c 6f 63 6b  31 25 3f 31 3d 26 46 45  |Y. block1%?1=&FE|
00001860  20 f1 8a 37 2c 31 30 29  bd 31 33 31 3b 22 4e 4f  | ..7,10).131;"NO|
00001870  20 41 54 53 20 52 4f 4d  20 49 4e 53 54 41 4c 4c  | ATS ROM INSTALL|
00001880  45 44 22 27 27 8a 35 29  bd 31 33 31 3b 22 49 4e  |ED"''.5).131;"IN|
00001890  53 54 41 4c 4c 20 41 4e  44 20 53 54 41 52 54 20  |STALL AND START |
000018a0  41 47 41 49 4e 22 0d 0d  16 10 fd 62 6c 6f 63 6b  |AGAIN".....block|
000018b0  31 25 3f 31 3d 30 0d 0d  20 05 e1 0d 0d 2a 05 3a  |1%?1=0.. ....*.:|
000018c0  0d 0d 34 09 dd a4 63 72  63 0d 0d 3e 0f 3f 62 6c  |..4...crc..>.?bl|
000018d0  6f 63 6b 31 25 3d 32 33  0d 0d 48 1b 62 6c 6f 63  |ock1%=23..H.bloc|
000018e0  6b 31 25 3f 31 3d 62 6c  6f 63 6b 33 25 20 83 20  |k1%?1=block3% . |
000018f0  32 35 36 0d 0d 52 1b 62  6c 6f 63 6b 31 25 3f 32  |256..R.block1%?2|
00001900  3d 62 6c 6f 63 6b 33 25  20 81 20 32 35 36 0d 0d  |=block3% . 256..|
00001910  5c 14 58 25 3d 62 6c 6f  63 6b 31 25 20 83 20 32  |\.X%=block1% . 2|
00001920  35 36 0d 0d 66 14 59 25  3d 62 6c 6f 63 6b 31 25  |56..f.Y%=block1%|
00001930  20 81 20 32 35 36 0d 0d  70 0a 41 25 3d 26 37 41  | . 256..p.A%=&7A|
00001940  0d 0d 7a 0a d6 26 46 46  46 31 0d 0d 84 10 f1 8a  |..z..&FFF1......|
00001950  32 30 2c 35 29 89 28 31  32 29 0d 0d 8e 31 e7 20  |20,5).(12)...1. |
00001960  62 6c 6f 63 6b 31 25 3f  33 3d 26 46 46 20 f1 8a  |block1%?3=&FF ..|
00001970  32 30 2c 35 29 bd 31 32  39 3b 22 43 52 43 20 45  |20,5).129;"CRC E|
00001980  52 52 4f 52 2e 20 20 20  20 20 22 0d 0d 98 2f e7  |RROR.     ".../.|
00001990  20 62 6c 6f 63 6b 31 25  3f 33 3d 30 20 f1 8a 32  | block1%?3=0 ..2|
000019a0  30 2c 35 29 bd 31 32 39  3b 22 57 41 52 4e 49 4e  |0,5).129;"WARNIN|
000019b0  47 3a 2d 4e 4f 20 43 52  43 22 0d 0d a2 0e 3d 62  |G:-NO CRC"....=b|
000019c0  6c 6f 63 6b 31 25 3f 33  0d 0d ac 05 3a 0d 0d b6  |lock1%?3....:...|
000019d0  0b dd f2 64 65 6c 61 79  0d 0d c0 07 d1 3d 30 0d  |...delay.....=0.|
000019e0  0d ca 0a f5 fd 91 3e 31  30 0d 0d d4 05 e1 0d 0d  |......>10.......|
000019f0  de 05 3a 0d 0d e8 0f dd  f2 6c 6f 61 64 6e 61 6d  |..:......loadnam|
00001a00  65 73 0d 0d f2 0d cf 23  46 49 4c 45 25 3d 30 0d  |es.....#FILE%=0.|
00001a10  0d fc 13 e3 20 49 25 3d  30 b8 6e 64 61 74 61 25  |.... I%=0.ndata%|
00001a20  2d 31 0d 0e 06 11 53 48  41 52 45 24 28 49 25 29  |-1....SHARE$(I%)|
00001a30  3d 22 22 0d 0e 10 0c e3  20 4a 25 3d 30 b8 36 0d  |=""..... J%=0.6.|
00001a40  0e 1a 0e 48 25 3d 9a 23  46 49 4c 45 25 0d 0e 24  |...H%=.#FILE%..$|
00001a50  1f 53 48 41 52 45 24 28  49 25 29 3d 53 48 41 52  |.SHARE$(I%)=SHAR|
00001a60  45 24 28 49 25 29 2b bd  28 48 25 29 0d 0e 2e 05  |E$(I%)+.(H%)....|
00001a70  ed 0d 0e 38 05 ed 0d 0e  42 05 e1 0d 0e 4c 05 3a  |...8....B....L.:|
00001a80  0d 0e 56 0d dd a4 73 75  62 70 61 67 65 0d 0e 60  |..V...subpage..`|
00001a90  0e 3d 62 6c 6f 63 6b 33  25 3f 34 0d 0e 6a 05 3a  |.=block3%?4..j.:|
00001aa0  0d 0e 74 0c dd f2 66 69  6e 69 73 68 0d 0e 7e 0b  |..t...finish..~.|
00001ab0  2a 54 54 58 4f 46 46 0d  0e 88 05 db 0d 0e 92 a0  |*TTXOFF.........|
00001ac0  f1 8a 30 2c 31 30 29 bd  31 33 31 3b 22 50 6f 72  |..0,10).131;"Por|
00001ad0  74 66 6f 6c 69 6f 20 22  3b 56 25 3b 22 20 73 74  |tfolio ";V%;" st|
00001ae0  61 72 74 73 20 6f 6e 20  22 3b 44 3b 22 2f 22 3b  |arts on ";D;"/";|
00001af0  4d 3b 22 2f 22 3b 59 27  bd 31 33 31 3b 22 61 6e  |M;"/";Y'.131;"an|
00001b00  64 20 74 68 65 20 43 45  45 46 41 58 20 64 61 74  |d the CEEFAX dat|
00001b10  65 20 69 73 20 22 3b 64  25 3b 22 2f 22 3b 6d 25  |e is ";d%;"/";m%|
00001b20  3b 22 2f 22 3b 79 25 27  27 bd 31 33 31 3b 22 46  |;"/";y%''.131;"F|
00001b30  41 54 41 4c 20 45 52 52  4f 52 22 27 bd 31 33 31  |ATAL ERROR"'.131|
00001b40  3b 22 50 72 6f 67 72 61  6d 20 74 65 72 6d 69 6e  |;"Program termin|
00001b50  61 74 69 6e 67 22 3a ef  32 31 3a e0 0d 0e 9c 05  |ating":.21:.....|
00001b60  3a 0d 0e a6 09 dd f2 6b  65 79 0d 0e b0 13 f1 27  |:......key.....'|
00001b70  22 50 52 45 53 53 20 41  20 4b 45 59 22 0d 0e ba  |"PRESS A KEY"...|
00001b80  0b 2a 46 58 32 31 2c 30  0d 0e c4 08 4b 25 3d a5  |.*FX21,0....K%=.|
00001b90  0d 0e ce 05 e1 0d 0e d8  05 3a 0d 0e e2 0b dd a4  |.........:......|
00001ba0  64 72 69 76 65 0d 0e ec  14 58 25 3d 62 6c 6f 63  |drive....X%=bloc|
00001bb0  6b 31 25 20 83 20 32 35  36 0d 0e f6 14 59 25 3d  |k1% . 256....Y%=|
00001bc0  62 6c 6f 63 6b 31 25 20  81 20 32 35 36 0d 0f 00  |block1% . 256...|
00001bd0  08 41 25 3d 36 0d 0f 0a  0d e3 20 49 25 3d 30 b8  |.A%=6..... I%=0.|
00001be0  31 31 0d 0f 14 10 62 6c  6f 63 6b 31 25 3f 49 25  |11....block1%?I%|
00001bf0  3d 30 0d 0f 1e 05 ed 0d  0f 28 1b 62 6c 6f 63 6b  |=0.......(.block|
00001c00  31 25 3f 32 3d 62 6c 6f  63 6b 33 25 20 81 20 32  |1%?2=block3% . 2|
00001c10  35 36 0d 0f 32 1b 62 6c  6f 63 6b 31 25 3f 31 3d  |56..2.block1%?1=|
00001c20  62 6c 6f 63 6b 33 25 20  83 20 32 35 36 0d 0f 3c  |block3% . 256..<|
00001c30  10 62 6c 6f 63 6b 31 25  3f 31 32 3d 31 0d 0f 46  |.block1%?12=1..F|
00001c40  0a d6 26 46 46 44 31 0d  0f 50 13 3d 28 62 6c 6f  |..&FFD1..P.=(blo|
00001c50  63 6b 33 25 3f 31 29 2d  34 38 0d 0f 5a 05 3a 0d  |ck3%?1)-48..Z.:.|
00001c60  0f 64 0e dd f2 6e 6f 74  66 6f 75 6e 64 0d 0f 6e  |.d...notfound..n|
00001c70  0b 2a 54 54 58 4f 46 46  0d 0f 78 05 db 0d 0f 82  |.*TTXOFF..x.....|
00001c80  0f 79 65 61 72 25 28 56  25 29 3d 59 0d 0f 8c 07  |.year%(V%)=Y....|
00001c90  d9 23 30 0d 0f 96 09 66  24 3d 22 22 0d 0f a0 2c  |.#0....f$=""...,|
00001ca0  e7 20 56 25 3d 30 20 66  24 3d 22 49 6e 64 65 78  |. V%=0 f$="Index|
00001cb0  20 64 61 74 61 22 20 8b  20 66 24 3d 70 24 2b 22  | data" . f$=p$+"|
00001cc0  20 22 2b c3 28 56 25 29  0d 0f aa 1e 66 24 3d 66  | "+.(V%)....f$=f|
00001cd0  24 2b 22 20 66 6f 72 20  22 2b c3 28 79 65 61 72  |$+" for "+.(year|
00001ce0  25 28 56 25 29 29 0d 0f  b4 28 e7 20 79 65 61 72  |%(V%))...(. year|
00001cf0  25 28 56 25 29 3d 30 20  80 20 56 25 3d 30 20 66  |%(V%)=0 . V%=0 f|
00001d00  24 3d 22 49 6e 64 65 78  20 64 61 74 61 22 0d 0f  |$="Index data"..|
00001d10  be 2d e7 20 79 65 61 72  25 28 56 25 29 3d 30 20  |.-. year%(V%)=0 |
00001d20  80 20 56 25 3c 3e 30 20  66 24 3d 22 50 6f 72 74  |. V%<>0 f$="Port|
00001d30  66 6f 6c 69 6f 20 64 61  74 61 22 0d 0f c8 05 f5  |folio data".....|
00001d40  0d 0f d2 22 f1 8a 30 2c  35 29 66 24 3b 22 20 6e  |..."..0,5)f$;" n|
00001d50  6f 74 20 6f 6e 20 74 68  69 73 20 64 69 73 63 3a  |ot on this disc:|
00001d60  2d 22 0d 0f dc 05 f5 0d  0f e6 ae f1 8a 32 2c 38  |-"...........2,8|
00001d70  29 22 41 29 20 28 41 29  62 61 6e 64 6f 6e 22 27  |)"A) (A)bandon"'|
00001d80  27 8a 32 29 22 43 29 20  28 43 29 61 74 61 6c 6f  |'.2)"C) (C)atalo|
00001d90  67 75 65 20 64 69 73 63  22 27 27 8a 32 29 22 44  |gue disc"''.2)"D|
00001da0  29 20 28 44 29 72 69 76  65 20 63 68 61 6e 67 65  |) (D)rive change|
00001db0  20 28 63 75 72 72 65 6e  74 6c 79 20 44 72 69 76  | (currently Driv|
00001dc0  65 20 22 3b a4 64 72 69  76 65 3b 22 29 22 27 27  |e ";.drive;")"''|
00001dd0  8a 32 29 22 47 29 20 28  47 29 6f 20 6f 6e 22 27  |.2)"G) (G)o on"'|
00001de0  27 8a 32 29 22 53 29 20  28 53 29 74 61 72 74 20  |'.2)"S) (S)tart |
00001df0  61 20 6e 65 77 20 66 69  6c 65 22 27 27 8a 32 29  |a new file"''.2)|
00001e00  22 43 68 6f 6f 73 65 20  41 2c 43 2c 44 2c 47 20  |"Choose A,C,D,G |
00001e10  6f 72 20 53 22 0d 0f f0  05 f5 0d 0f fa 0b 2a 46  |or S".........*F|
00001e20  58 32 31 2c 30 0d 10 04  10 4b 45 59 25 3d a5 20  |X21,0....KEY%=. |
00001e30  80 20 26 44 46 0d 10 0e  35 fd 20 4b 45 59 25 3d  |. &DF...5. KEY%=|
00001e40  36 35 20 84 20 4b 45 59  25 3d 36 37 20 84 20 4b  |65 . KEY%=67 . K|
00001e50  45 59 25 3d 36 38 20 84  20 4b 45 59 25 3d 37 31  |EY%=68 . KEY%=71|
00001e60  20 84 20 4b 45 59 25 3d  38 33 0d 10 18 12 e7 20  | . KEY%=83..... |
00001e70  4b 45 59 25 3d 36 37 20  8c 20 2a 2e 0d 10 22 a7  |KEY%=67 . *...".|
00001e80  e7 20 4b 45 59 25 3d 36  38 20 f1 27 8a 31 30 29  |. KEY%=68 .'.10)|
00001e90  22 45 6e 74 65 72 20 64  72 69 76 65 20 6e 6f 2e  |"Enter drive no.|
00001ea0  22 3b 3a f5 3a 4b 45 59  25 3d a5 2d 34 38 3a fd  |";:.:KEY%=.-48:.|
00001eb0  4b 45 59 25 3e 2d 31 20  80 20 4b 45 59 25 3c 34  |KEY%>-1 . KEY%<4|
00001ec0  3a f1 3b 22 20 22 3b 4b  45 59 25 3a 24 6c 69 6e  |:.;" ";KEY%:$lin|
00001ed0  65 3d 22 44 52 2e 22 2b  c3 28 4b 45 59 25 29 3a  |e="DR."+.(KEY%):|
00001ee0  58 25 3d 6c 69 6e 65 20  83 20 32 35 36 3a 59 25  |X%=line . 256:Y%|
00001ef0  3d 6c 69 6e 65 20 81 20  32 35 36 3a d6 26 46 46  |=line . 256:.&FF|
00001f00  46 37 3a f1 27 27 8a 31  30 29 22 44 72 69 76 65  |F7:.''.10)"Drive|
00001f10  20 22 3b 4b 45 59 25 3b  22 20 73 65 6c 65 63 74  | ";KEY%;" select|
00001f20  65 64 22 0d 10 2c 28 e7  20 4b 45 59 25 3d 36 35  |ed"..,(. KEY%=65|
00001f30  20 84 20 4b 45 59 25 3d  37 31 20 84 20 4b 45 59  | . KEY%=71 . KEY|
00001f40  25 3d 38 33 20 e5 20 8d  44 40 50 0d 10 36 08 f2  |%=83 . .D@P..6..|
00001f50  6b 65 79 0d 10 40 05 db  0d 10 4a 20 fd 4b 45 59  |key..@....J .KEY|
00001f60  25 3d 36 35 20 84 20 4b  45 59 25 3d 37 31 20 84  |%=65 . KEY%=71 .|
00001f70  20 4b 45 59 25 3d 38 33  0d 10 54 07 d9 23 30 0d  | KEY%=83..T..#0.|
00001f80  10 5e 1c 42 25 3d ad 28  c3 28 79 65 61 72 25 28  |.^.B%=.(.(year%(|
00001f90  56 25 29 2a 31 30 2b 56  25 29 29 0d 10 68 07 d9  |V%)*10+V%))..h..|
00001fa0  23 30 0d 10 72 1e fd 42  25 3c 3e 30 20 84 20 4b  |#0..r..B%<>0 . K|
00001fb0  45 59 25 3d 36 35 20 84  20 4b 45 59 25 3d 38 33  |EY%=65 . KEY%=83|
00001fc0  0d 10 7c 09 ee 20 85 20  87 0d 10 86 1c e7 20 4b  |..|.. . ...... K|
00001fd0  45 59 25 3d 36 35 20 f2  63 68 61 69 6e 28 22 4d  |EY%=65 .chain("M|
00001fe0  41 49 4e 22 29 0d 10 90  15 e7 20 4b 45 59 25 3d  |AIN")..... KEY%=|
00001ff0  38 33 20 f2 6f 70 65 6e  3a e1 0d 10 9a 05 e1 0d  |83 .open:.......|
00002000  10 a4 05 3a 0d 10 ae 0a  dd f2 6f 70 65 6e 0d 10  |...:......open..|
00002010  b8 27 e7 20 56 25 3d 30  20 66 24 3d 22 49 6e 64  |.'. V%=0 f$="Ind|
00002020  65 78 22 20 8b 20 66 24  3d 70 24 2b 22 20 22 2b  |ex" . f$=p$+" "+|
00002030  c3 28 56 25 29 0d 10 c2  1e f1 8a 30 2c 33 29 66  |.(V%)......0,3)f|
00002040  24 3b 22 20 66 6f 72 20  22 3b 79 65 61 72 25 28  |$;" for ";year%(|
00002050  56 25 29 0d 10 cc 6b f1  8a 30 2c 35 29 22 41 20  |V%)...k..0,5)"A |
00002060  6e 65 77 20 66 69 6c 65  20 77 69 6c 6c 20 62 65  |new file will be|
00002070  20 6f 70 65 6e 65 64 20  69 66 20 74 68 65 72 65  | opened if there|
00002080  20 69 73 22 27 22 65 6e  6f 75 67 68 20 73 70 61  | is"'"enough spa|
00002090  63 65 2e 22 27 27 22 44  6f 20 79 6f 75 20 77 69  |ce."''"Do you wi|
000020a0  73 68 20 74 6f 20 73 74  61 72 74 20 61 20 6e 65  |sh to start a ne|
000020b0  77 20 66 69 6c 65 3f 20  28 59 2f 4e 29 22 0d 10  |w file? (Y/N)"..|
000020c0  d6 05 f5 0d 10 e0 0b 2a  46 58 32 31 2c 30 0d 10  |.......*FX21,0..|
000020d0  ea 0e 41 25 3d a5 20 80  20 26 44 46 0d 10 f4 13  |..A%=. . &DF....|
000020e0  fd 20 41 25 3d 37 38 20  84 20 41 25 3d 38 39 0d  |. A%=78 . A%=89.|
000020f0  10 fe 0d e7 20 41 25 3d  37 38 20 e1 0d 11 08 05  |.... A%=78 .....|
00002100  f5 0d 11 12 05 f5 0d 11  1c a2 f1 27 22 45 6e 74  |...........'"Ent|
00002110  65 72 20 64 61 74 65 20  66 72 6f 6d 20 77 68 69  |er date from whi|
00002120  63 68 20 22 3b 66 24 27  22 69 73 20 74 6f 20 73  |ch ";f$'"is to s|
00002130  74 61 72 74 20 69 6e 20  74 68 65 20 66 6f 72 6d  |tart in the form|
00002140  20 44 44 2f 4d 4d 22 27  22 77 68 65 72 65 20 44  | DD/MM"'"where D|
00002150  44 20 69 73 20 74 68 65  20 64 61 79 20 6f 66 20  |D is the day of |
00002160  74 68 65 20 6d 6f 6e 74  68 22 27 22 61 6e 64 20  |the month"'"and |
00002170  4d 4d 20 69 73 20 74 68  65 20 6d 6f 6e 74 68 20  |MM is the month |
00002180  6f 66 20 74 68 65 20 79  65 61 72 22 3b 3a e8 61  |of the year";:.a|
00002190  24 3a 61 24 3d 61 24 2b  22 2f 22 2b c3 28 79 65  |$:a$=a$+"/"+.(ye|
000021a0  61 72 25 28 56 25 29 29  0d 11 26 25 e7 20 c1 61  |ar%(V%))..&%. .a|
000021b0  24 2c 33 2c 31 29 3c 3e  22 2f 22 20 f2 65 72 72  |$,3,1)<>"/" .err|
000021c0  6f 72 64 61 74 65 3a e5  20 8d 54 5c 51 0d 11 30  |ordate:. .T\Q..0|
000021d0  0d e3 20 49 25 3d 31 b8  31 30 0d 11 3a 18 e7 20  |.. I%=1.10..:.. |
000021e0  49 25 3d 33 20 84 20 49  25 3d 36 20 e5 20 8d 44  |I%=3 . I%=6 . .D|
000021f0  4e 51 0d 11 44 34 e7 20  c1 61 24 2c 49 25 2c 31  |NQ..D4. .a$,I%,1|
00002200  29 3c 22 30 22 20 84 20  c1 61 24 2c 49 25 2c 31  |)<"0" . .a$,I%,1|
00002210  29 3e 22 39 22 20 f2 65  72 72 6f 72 64 61 74 65  |)>"9" .errordate|
00002220  3a 49 25 3d 32 30 0d 11  4e 05 ed 0d 11 58 0b fd  |:I%=20..N....X..|
00002230  20 49 25 3c 31 39 0d 11  62 11 44 3d bb 28 c1 61  | I%<19..b.D=.(.a|
00002240  24 2c 31 2c 32 29 29 0d  11 6c 11 4d 3d bb 28 c1  |$,1,2))..l.M=.(.|
00002250  61 24 2c 34 2c 32 29 29  0d 11 76 11 59 3d bb 28  |a$,4,2))..v.Y=.(|
00002260  c1 61 24 2c 37 2c 34 29  29 0d 11 80 23 e7 20 a4  |.a$,7,4))...#. .|
00002270  76 61 6c 69 64 61 74 65  28 44 2c 4d 2c 59 29 3d  |validate(D,M,Y)=|
00002280  30 20 f2 65 72 72 6f 72  64 61 74 65 0d 11 8a 19  |0 .errordate....|
00002290  fd 20 a4 76 61 6c 69 64  61 74 65 28 44 2c 4d 2c  |. .validate(D,M,|
000022a0  59 29 3c 3e 30 0d 11 94  2c e8 27 22 41 6e 64 20  |Y)<>0...,.'"And |
000022b0  65 6e 74 65 72 20 64 61  79 20 6f 66 20 77 65 65  |enter day of wee|
000022c0  6b 20 28 4d 6f 6e 64 61  79 3d 31 29 20 22 44 41  |k (Monday=1) "DA|
000022d0  59 0d 11 9e 7b e7 20 44  41 59 3e 35 20 f1 27 22  |Y...{. DAY>5 .'"|
000022e0  57 65 65 6b 65 6e 64 73  20 61 72 65 20 6e 6f 74  |Weekends are not|
000022f0  20 61 6c 6c 6f 77 65 64  20 21 22 27 22 54 68 65  | allowed !"'"The|
00002300  20 6e 65 78 74 20 4d 6f  6e 64 61 79 20 77 69 6c  | next Monday wil|
00002310  6c 20 62 65 20 75 73 65  64 20 61 6e 64 22 27 22  |l be used and"'"|
00002320  74 68 65 20 64 61 74 65  20 77 69 6c 6c 20 62 65  |the date will be|
00002330  20 61 64 6a 75 73 74 65  64 2e 22 3a 43 25 3d 31  | adjusted.":C%=1|
00002340  3a f2 61 64 6a 75 73 74  64 61 74 65 0d 11 a8 05  |:.adjustdate....|
00002350  db 0d 11 b2 26 f1 8a 32  2c 35 29 22 49 4e 49 54  |....&..2,5)"INIT|
00002360  49 41 4c 49 53 49 4e 47  20 2d 20 50 6c 65 61 73  |IALISING - Pleas|
00002370  65 20 77 61 69 74 22 0d  11 bc 1e 42 25 3d ad 28  |e wait"....B%=.(|
00002380  c3 28 79 65 61 72 25 28  56 25 29 2d 31 29 2b c3  |.(year%(V%)-1)+.|
00002390  28 56 25 29 29 0d 11 c6  11 e7 20 42 25 3d 30 20  |(V%))..... B%=0 |
000023a0  e5 20 8d 54 6a 52 0d 11  d0 2c f4 20 54 61 6b 65  |. .TjR...,. Take|
000023b0  20 61 20 63 6f 70 79 20  6f 66 20 73 68 61 72 65  | a copy of share|
000023c0  6e 61 6d 65 73 20 66 6f  72 20 6e 65 77 20 66 69  |names for new fi|
000023d0  6c 65 0d 11 da 10 e3 49  25 3d 31 b8 6e 64 61 74  |le.....I%=1.ndat|
000023e0  61 25 0d 11 e4 0d 73 24  28 49 25 29 3d 22 22 0d  |a%....s$(I%)="".|
000023f0  11 ee 0b e3 4a 25 3d 31  b8 37 0d 11 f8 19 73 24  |....J%=1.7....s$|
00002400  28 49 25 29 3d 73 24 28  49 25 29 2b bd 28 9a 23  |(I%)=s$(I%)+.(.#|
00002410  42 25 29 0d 12 02 05 ed  0d 12 0c 05 ed 0d 12 16  |B%).............|
00002420  07 d9 23 30 0d 12 20 35  f4 20 53 65 6e 64 20 64  |..#0.. 5. Send d|
00002430  61 74 61 20 74 6f 20 64  69 73 63 20 61 73 20 6f  |ata to disc as o|
00002440  75 74 6c 69 6e 65 64 20  61 74 20 73 74 61 72 74  |utlined at start|
00002450  20 6f 66 20 70 72 6f 67  2e 0d 12 2a 0b f2 65 73  | of prog...*..es|
00002460  70 61 63 65 0d 12 34 0a  f2 6f 70 65 6e 32 0d 12  |pace..4..open2..|
00002470  3e 0d f2 70 75 73 68 79  65 61 72 0d 12 48 09 ee  |>..pushyear..H..|
00002480  20 85 20 87 0d 12 52 05  e1 0d 12 5c 05 3a 0d 12  | . ...R....\.:..|
00002490  66 0b dd f2 6f 70 65 6e  32 0d 12 70 33 24 6c 69  |f...open2..p3$li|
000024a0  6e 65 3d 22 53 41 56 45  20 22 2b c3 28 79 65 61  |ne="SAVE "+.(yea|
000024b0  72 25 28 56 25 29 29 2b  c3 28 56 25 29 2b 22 20  |r%(V%))+.(V%)+" |
000024c0  32 30 30 30 20 2b 22 2b  c3 7e 44 25 0d 12 7a 0a  |2000 +"+.~D%..z.|
000024d0  d6 26 46 46 46 37 0d 12  84 1c 41 25 3d ae 28 c3  |.&FFF7....A%=.(.|
000024e0  28 79 65 61 72 25 28 56  25 29 29 2b c3 28 56 25  |(year%(V%))+.(V%|
000024f0  29 29 0d 12 8e 10 e3 49  25 3d 31 b8 6e 64 61 74  |)).....I%=1.ndat|
00002500  61 25 0d 12 98 0b e3 4a  25 3d 31 b8 37 0d 12 a2  |a%.....J%=1.7...|
00002510  19 d5 23 41 25 2c 97 28  c1 73 24 28 49 25 29 2c  |..#A%,.(.s$(I%),|
00002520  4a 25 2c 31 29 29 0d 12  ac 05 ed 0d 12 b6 05 ed  |J%,1))..........|
00002530  0d 12 c0 12 cf 23 41 25  3d 66 69 72 73 74 70 74  |.....#A%=firstpt|
00002540  72 25 0d 12 ca 19 d5 23  41 25 2c 6d 69 6e 72 65  |r%.....#A%,minre|
00002550  63 6f 72 64 25 20 81 20  32 35 36 0d 12 d4 19 d5  |cord% . 256.....|
00002560  23 41 25 2c 6d 69 6e 72  65 63 6f 72 64 25 20 83  |#A%,minrecord% .|
00002570  20 32 35 36 0d 12 de 0a  d5 23 41 25 2c 44 0d 12  | 256.....#A%,D..|
00002580  e8 0a d5 23 41 25 2c 4d  0d 12 f2 12 d5 23 41 25  |...#A%,M.....#A%|
00002590  2c 28 59 20 81 20 32 35  36 29 0d 12 fc 12 d5 23  |,(Y . 256).....#|
000025a0  41 25 2c 28 59 20 83 20  32 35 36 29 0d 13 06 0c  |A%,(Y . 256)....|
000025b0  d5 23 41 25 2c 44 41 59  0d 13 10 19 d5 23 41 25  |.#A%,DAY.....#A%|
000025c0  2c 6d 69 6e 72 65 63 6f  72 64 25 20 81 20 32 35  |,minrecord% . 25|
000025d0  36 0d 13 1a 19 d5 23 41  25 2c 6d 69 6e 72 65 63  |6.....#A%,minrec|
000025e0  6f 72 64 25 20 83 20 32  35 36 0d 13 24 0a d5 23  |ord% . 256..$..#|
000025f0  41 25 2c 44 0d 13 2e 0a  d5 23 41 25 2c 4d 0d 13  |A%,D.....#A%,M..|
00002600  38 12 d5 23 41 25 2c 28  59 20 81 20 32 35 36 29  |8..#A%,(Y . 256)|
00002610  0d 13 42 12 d5 23 41 25  2c 28 59 20 83 20 32 35  |..B..#A%,(Y . 25|
00002620  36 29 0d 13 4c 11 e3 20  49 25 3d 31 b8 6e 64 61  |6)..L.. I%=1.nda|
00002630  74 61 25 0d 13 56 0c d5  23 41 25 2c 26 46 46 0d  |ta%..V..#A%,&FF.|
00002640  13 60 0c d5 23 41 25 2c  26 46 46 0d 13 6a 0a d5  |.`..#A%,&FF..j..|
00002650  23 41 25 2c 30 0d 13 74  0a d5 23 41 25 2c 30 0d  |#A%,0..t..#A%,0.|
00002660  13 7e 05 ed 0d 13 88 13  cf 23 41 25 3d 6d 69 6e  |.~.......#A%=min|
00002670  72 65 63 6f 72 64 25 0d  13 92 08 43 25 3d 31 0d  |record%....C%=1.|
00002680  13 9c 0a 47 25 3d bc 2b  31 0d 13 a6 0a 4f 4c 44  |...G%=.+1....OLD|
00002690  59 3d 59 0d 13 b0 08 43  25 3d 31 0d 13 ba 05 f5  |Y=Y....C%=1.....|
000026a0  0d 13 c4 0f f2 61 64 6a  75 73 74 64 61 74 65 0d  |.....adjustdate.|
000026b0  13 ce 14 e7 20 59 3c 3e  4f 4c 44 59 20 e5 20 8d  |.... Y<>OLDY . .|
000026c0  54 40 54 0d 13 d8 13 e3  20 49 25 3d 31 b8 6e 64  |T@T..... I%=1.nd|
000026d0  61 74 61 25 2a 32 0d 13  e2 0a d5 23 41 25 2c 30  |ata%*2.....#A%,0|
000026e0  0d 13 ec 05 ed 0d 13 f6  1c f1 8a 35 2c 47 25 29  |...........5,G%)|
000026f0  44 3b 22 2f 22 3b 4d 3b  22 2f 22 3b 59 3b 22 20  |D;"/";M;"/";Y;" |
00002700  22 0d 14 00 0d fd 20 59  3c 3e 4f 4c 44 59 0d 14  |"..... Y<>OLDY..|
00002710  0a 13 e3 20 49 25 3d 31  b8 6e 64 61 74 61 25 2a  |... I%=1.ndata%*|
00002720  32 0d 14 14 0a d5 23 41  25 2c 30 0d 14 1e 05 ed  |2.....#A%,0.....|
00002730  0d 14 28 07 d9 23 30 0d  14 32 0d f2 74 68 6f 6c  |..(..#0..2..thol|
00002740  64 28 31 29 0d 14 3c 46  f4 20 53 65 74 20 63 75  |d(1)..<F. Set cu|
00002750  72 72 65 6e 74 20 64 69  73 63 20 70 6f 69 6e 74  |rrent disc point|
00002760  65 72 20 74 6f 20 70 6f  69 6e 74 20 61 74 20 63  |er to point at c|
00002770  75 72 72 65 6e 74 20 64  61 74 61 20 70 6f 69 6e  |urrent data poin|
00002780  74 20 69 65 20 66 69 72  73 74 0d 14 46 17 64 69  |t ie first..F.di|
00002790  73 63 70 74 72 25 3d 6d  69 6e 72 65 63 6f 72 64  |scptr%=minrecord|
000027a0  25 0d 14 50 07 d9 23 30  0d 14 5a 05 db 0d 14 64  |%..P..#0..Z....d|
000027b0  09 ee 20 85 20 87 0d 14  6e 05 e1 0d 14 78 05 3a  |.. . ...n....x.:|
000027c0  0d 14 82 0f dd f2 74 68  6f 6c 64 28 42 25 29 0d  |......thold(B%).|
000027d0  14 8c 2e e7 20 42 25 3d  30 3a 74 65 6d 70 64 61  |.... B%=0:tempda|
000027e0  79 3d 44 41 59 3a 74 65  6d 70 64 3d 44 3a 74 65  |y=DAY:tempd=D:te|
000027f0  6d 70 6d 3d 4d 3a 74 65  6d 70 79 3d 59 0d 14 96  |mpm=M:tempy=Y...|
00002800  2e e7 20 42 25 3d 31 20  44 41 59 3d 74 65 6d 70  |.. B%=1 DAY=temp|
00002810  64 61 79 3a 44 3d 74 65  6d 70 64 3a 4d 3d 74 65  |day:D=tempd:M=te|
00002820  6d 70 6d 3a 59 3d 74 65  6d 70 79 0d 14 a0 05 e1  |mpm:Y=tempy.....|
00002830  0d 14 aa 05 3a 0d 14 b4  0c dd f2 65 73 70 61 63  |....:......espac|
00002840  65 0d 14 be 0d f2 74 68  6f 6c 64 28 30 29 0d 14  |e.....thold(0)..|
00002850  c8 08 43 25 3d 31 0d 14  d2 08 44 25 3d 30 0d 14  |..C%=1....D%=0..|
00002860  dc 0a 4f 4c 44 59 3d 59  0d 14 e6 05 f5 0d 14 f0  |..OLDY=Y........|
00002870  0f f2 61 64 6a 75 73 74  64 61 74 65 0d 14 fa 0b  |..adjustdate....|
00002880  44 25 3d 44 25 2b 31 0d  15 04 0c fd 59 3c 3e 4f  |D%=D%+1.....Y<>O|
00002890  4c 44 59 0d 15 0e 0d f2  74 68 6f 6c 64 28 31 29  |LDY.....thold(1)|
000028a0  0d 15 18 16 44 25 3d 28  44 25 2d 31 29 2a 6e 64  |....D%=(D%-1)*nd|
000028b0  61 74 61 25 2a 32 0d 15  22 11 58 25 3d 6c 69 6e  |ata%*2..".X%=lin|
000028c0  65 20 83 20 32 35 36 0d  15 2c 11 59 25 3d 6c 69  |e . 256..,.Y%=li|
000028d0  6e 65 20 81 20 32 35 36  0d 15 36 09 ee 20 85 20  |ne . 256..6.. . |
000028e0  87 0d 15 40 05 e1 0d 15  4a 05 3a 0d 15 54 0f dd  |...@....J.:..T..|
000028f0  f2 65 72 72 6f 72 64 61  74 65 0d 15 5e 05 db 0d  |.errordate..^...|
00002900  15 68 36 f1 8a 35 2c 31  30 29 22 45 72 72 6f 72  |.h6..5,10)"Error|
00002910  20 69 6e 20 64 61 74 65  2e 22 27 27 22 50 72 65  | in date."''"Pre|
00002920  73 73 20 61 20 4b 45 59  20 74 6f 20 72 65 2d 65  |ss a KEY to re-e|
00002930  6e 74 65 72 22 0d 15 72  08 49 25 3d a5 0d 15 7c  |nter"..r.I%=...||
00002940  05 db 0d 15 86 05 e1 0d  15 90 05 3a 0d 15 9a 0e  |...........:....|
00002950  dd f2 70 75 73 68 79 65  61 72 0d 15 a4 0b f2 73  |..pushyear.....s|
00002960  79 73 74 65 6d 0d 15 ae  13 58 25 3d ae 28 22 3a  |ystem....X%=.(":|
00002970  30 2e 59 45 41 52 22 29  0d 15 b8 0c e3 20 49 25  |0.YEAR")..... I%|
00002980  3d 30 b8 33 0d 15 c2 12  f1 23 58 25 2c 79 65 61  |=0.3.....#X%,yea|
00002990  72 25 28 49 25 29 0d 15  cc 05 ed 0d 15 d6 05 e1  |r%(I%)..........|
000029a0  0d 15 e0 05 3a 0d 15 ea  0c dd f2 73 79 73 74 65  |....:......syste|
000029b0  6d 0d 15 f4 05 f5 0d 15  fe 0b 2a 46 58 32 31 2c  |m.........*FX21,|
000029c0  30 0d 16 08 13 41 25 3d  ad 28 22 3a 30 2e 4d 41  |0....A%=.(":0.MA|
000029d0  49 4e 22 29 0d 16 12 07  d9 23 30 0d 16 1c 58 e7  |IN").....#0...X.|
000029e0  20 41 25 3d 30 20 db 3a  f1 8a 30 2c 31 30 29 22  | A%=0 .:..0,10)"|
000029f0  49 6e 73 65 72 74 20 53  79 73 74 65 6d 20 44 69  |Insert System Di|
00002a00  73 63 20 69 6e 20 64 72  69 76 65 20 30 22 27 27  |sc in drive 0"''|
00002a10  22 61 6e 64 20 70 72 65  73 73 20 61 6e 79 20 6b  |"and press any k|
00002a20  65 79 20 74 6f 20 63 6f  6e 74 69 6e 75 65 22 3a  |ey to continue":|
00002a30  f5 fd a5 0d 16 26 0b fd  20 41 25 3c 3e 30 0d 16  |.....&.. A%<>0..|
00002a40  30 05 e1 0d 16 3a 05 3a  0d 16 44 0e dd f2 61 73  |0....:.:..D...as|
00002a50  73 65 6d 62 6c 65 0d 16  4e 07 ef 32 31 0d 16 58  |semble..N..21..X|
00002a60  0f e3 20 4e 25 3d 30 b8  32 20 88 32 0d 16 62 0a  |.. N%=0.2 .2..b.|
00002a70  50 25 3d 6d 63 25 0d 16  6c 05 5b 0d 16 76 0a 4f  |P%=mc%..l.[..v.O|
00002a80  50 54 20 4e 25 0d 16 80  0a 2e 73 74 61 72 74 0d  |PT N%.....start.|
00002a90  16 8a 3d 20 20 20 20 6c  64 61 20 23 62 6c 6f 63  |..=    lda #bloc|
00002aa0  6b 33 25 20 83 20 32 35  36 3a 73 74 61 20 26 38  |k3% . 256:sta &8|
00002ab0  30 3a 6c 64 61 20 23 62  6c 6f 63 6b 33 25 20 81  |0:lda #block3% .|
00002ac0  20 32 35 36 3a 73 74 61  20 26 38 31 0d 16 94 09  | 256:sta &81....|
00002ad0  2e 6c 6f 6f 70 0d 16 9e  0e 20 20 20 20 6c 64 79  |.loop....    ldy|
00002ae0  20 23 32 0d 16 a8 0a 2e  6c 6f 6f 70 31 0d 16 b2  | #2.....loop1...|
00002af0  28 20 20 20 20 6c 64 61  20 28 26 38 30 29 2c 59  |(    lda (&80),Y|
00002b00  3a 61 6e 64 20 23 26 37  46 3a 73 74 61 20 28 26  |:and #&7F:sta (&|
00002b10  38 30 29 2c 59 0d 16 bc  08 2e 6f 6b 31 0d 16 c6  |80),Y.....ok1...|
00002b20  2b 20 20 20 20 63 6d 70  20 23 33 32 3a 62 63 73  |+    cmp #32:bcs|
00002b30  20 6f 6b 32 3a 6c 64 61  20 23 33 32 3a 73 74 61  | ok2:lda #32:sta|
00002b40  20 28 26 38 30 29 2c 59  0d 16 d0 08 2e 6f 6b 32  | (&80),Y.....ok2|
00002b50  0d 16 da 9d 20 20 20 20  69 6e 79 3a 63 70 79 20  |....    iny:cpy |
00002b60  23 34 32 3a 62 63 63 20  6c 6f 6f 70 31 3a 63 6c  |#42:bcc loop1:cl|
00002b70  63 3a 6c 64 61 20 23 34  32 3a 61 64 63 20 26 38  |c:lda #42:adc &8|
00002b80  30 3a 73 74 61 20 26 38  30 3a 6c 64 61 20 23 30  |0:sta &80:lda #0|
00002b90  3a 61 64 63 20 26 38 31  3a 73 74 61 20 26 38 31  |:adc &81:sta &81|
00002ba0  3a 63 6d 70 20 23 28 62  6c 6f 63 6b 33 25 2b 26  |:cmp #(block3%+&|
00002bb0  38 30 30 29 20 81 20 32  35 36 3a 62 63 63 20 6c  |800) . 256:bcc l|
00002bc0  6f 6f 70 3a 6c 64 61 20  26 38 30 3a 63 6d 70 20  |oop:lda &80:cmp |
00002bd0  23 28 62 6c 6f 63 6b 33  25 20 83 20 32 35 36 29  |#(block3% . 256)|
00002be0  3a 62 63 63 20 6c 6f 6f  70 3a 72 74 73 0d 16 e4  |:bcc loop:rts...|
00002bf0  05 5d 0d 16 ee 05 ed 0d  16 f8 06 ef 36 0d 17 02  |.]..........6...|
00002c00  05 e1 0d ff                                       |....|
00002c04
22-07-88/AUTO.m0
22-07-88/AUTO.m1
22-07-88/AUTO.m2
22-07-88/AUTO.m4
22-07-88/AUTO.m5