Home » CEEFAX disks » telesoftware11.adl » 27-11-88/AUTO

27-11-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 » telesoftware11.adl
Filename: 27-11-88/AUTO
Read OK:
File size: 2C07 bytes
Load address: FFFF1A00
Exec address: FFFF1A00
File contents
   10REM PORTFOLIO - AUTO-ENTRY
   20REM (C) Jon Leighton Nov 1988
   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 P%=PTR#FILE%:PTR#FILE%=P%+4: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 J%>&FFFE =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(16)
 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 Nov 1988
:
(�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%
*1� price%(I%)=0 P%=�#FILE%:�#FILE%=P%+4:� �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
�
"� J%>&FFFE =� � =�
,:
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)�(16)

�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 4e 6f 76 20 31  39 38 38 0d 00 1e 05 3a  |on Nov 1988....:|
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  31 e7 20 70 72 69 63 65  25 28 49 25 29 3d 30 20  |1. price%(I%)=0 |
000005e0  50 25 3d 8f 23 46 49 4c  45 25 3a cf 23 46 49 4c  |P%=.#FILE%:.#FIL|
000005f0  45 25 3d 50 25 2b 34 3a  e5 20 8d 44 5c 43 0d 03  |E%=P%+4:. .D\C..|
00000600  34 1c 6d 69 6e 25 3d 9a  23 46 49 4c 45 25 2a 32  |4.min%=.#FILE%*2|
00000610  35 36 2b 9a 23 46 49 4c  45 25 0d 03 3e 23 e7 20  |56+.#FILE%..>#. |
00000620  6d 69 6e 25 3e 70 72 69  63 65 25 28 49 25 29 20  |min%>price%(I%) |
00000630  f2 75 70 64 61 74 65 6d  61 78 6d 69 6e 0d 03 48  |.updatemaxmin..H|
00000640  1c 6d 61 78 25 3d 9a 23  46 49 4c 45 25 2a 32 35  |.max%=.#FILE%*25|
00000650  36 2b 9a 23 46 49 4c 45  25 0d 03 52 23 e7 20 6d  |6+.#FILE%..R#. m|
00000660  61 78 25 3c 70 72 69 63  65 25 28 49 25 29 20 f2  |ax%<price%(I%) .|
00000670  75 70 64 61 74 65 6d 61  78 6d 69 6e 0d 03 5c 05  |updatemaxmin..\.|
00000680  ed 0d 03 66 05 e1 0d 03  70 05 3a 0d 03 7a 12 dd  |...f....p.:..z..|
00000690  f2 75 70 64 61 74 65 6d  61 78 6d 69 6e 0d 03 84  |.updatemaxmin...|
000006a0  15 cf 23 46 49 4c 45 25  3d 8f 23 46 49 4c 45 25  |..#FILE%=.#FILE%|
000006b0  2d 32 0d 03 8e 1c d5 23  46 49 4c 45 25 2c 70 72  |-2.....#FILE%,pr|
000006c0  69 63 65 25 28 49 25 29  20 81 20 32 35 36 0d 03  |ice%(I%) . 256..|
000006d0  98 1c d5 23 46 49 4c 45  25 2c 70 72 69 63 65 25  |...#FILE%,price%|
000006e0  28 49 25 29 20 83 20 32  35 36 0d 03 a2 05 e1 0d  |(I%) . 256......|
000006f0  03 ac 05 3a 0d 03 b6 15  dd f2 63 68 61 6e 67 65  |...:......change|
00000700  5f 64 61 74 65 28 43 25  29 0d 03 c0 23 64 69 73  |_date(C%)...#dis|
00000710  63 70 74 72 25 3d 64 69  73 63 70 74 72 25 2b 28  |cptr%=discptr%+(|
00000720  43 25 2a 6e 64 61 74 61  25 2a 32 29 0d 03 ca 38  |C%*ndata%*2)...8|
00000730  e7 20 64 69 73 63 70 74  72 25 3c 6d 69 6e 72 65  |. discptr%<minre|
00000740  63 6f 72 64 25 20 64 69  73 63 70 74 72 25 3d 6d  |cord% discptr%=m|
00000750  69 6e 72 65 63 6f 72 64  25 3a ef 37 3a f2 66 69  |inrecord%:.7:.fi|
00000760  6e 69 73 68 0d 03 d4 78  e7 20 64 69 73 63 70 74  |nish...x. discpt|
00000770  72 25 3e 28 a2 23 46 49  4c 45 25 29 2d 6e 64 61  |r%>(.#FILE%)-nda|
00000780  74 61 25 2a 32 20 64 69  73 63 70 74 72 25 3d 64  |ta%*2 discptr%=d|
00000790  69 73 63 70 74 72 25 2d  28 43 25 2a 6e 64 61 74  |iscptr%-(C%*ndat|
000007a0  61 25 2a 32 29 3a 44 3d  31 3a 4d 3d 31 3a 59 3d  |a%*2):D=1:M=1:Y=|
000007b0  79 65 61 72 25 28 56 25  29 2b 31 3a f2 6e 6f 74  |year%(V%)+1:.not|
000007c0  66 6f 75 6e 64 3a f2 63  68 65 63 6b 5f 61 6e 64  |found:.check_and|
000007d0  5f 6f 70 65 6e 5f 66 69  6c 65 3a e1 0d 03 de 0f  |_open_file:.....|
000007e0  f2 61 64 6a 75 73 74 64  61 74 65 0d 03 e8 05 e1  |.adjustdate.....|
000007f0  0d 03 f2 05 3a 0d 03 fc  10 dd f2 61 64 6a 75 73  |....:......adjus|
00000800  74 64 61 74 65 0d 04 06  05 f5 0d 04 10 0a 44 3d  |tdate.........D=|
00000810  44 2b 43 25 0d 04 1a 05  f5 0d 04 24 1f e7 20 a4  |D+C%.......$.. .|
00000820  76 61 6c 69 64 61 74 65  28 44 2c 4d 2c 59 29 3d  |validate(D,M,Y)=|
00000830  30 20 44 3d 44 2b 43 25  0d 04 2e 25 e7 20 44 3e  |0 D=D+C%...%. D>|
00000840  33 31 20 44 3d 31 3a 4d  3d 4d 2b 31 3a e7 20 4d  |31 D=1:M=M+1:. M|
00000850  3e 31 32 20 4d 3d 31 3a  59 3d 59 2b 31 0d 04 38  |>12 M=1:Y=Y+1..8|
00000860  25 e7 20 44 3c 31 20 44  3d 33 31 3a 4d 3d 4d 2d  |%. D<1 D=31:M=M-|
00000870  31 3a e7 20 4d 3c 31 20  4d 3d 31 32 3a 59 3d 59  |1:. M<1 M=12:Y=Y|
00000880  2d 31 0d 04 42 19 fd 20  a4 76 61 6c 69 64 61 74  |-1..B.. .validat|
00000890  65 28 44 2c 4d 2c 59 29  3c 3e 30 0d 04 4c 0e 44  |e(D,M,Y)<>0..L.D|
000008a0  41 59 3d 44 41 59 2b 43  25 0d 04 56 11 e7 20 44  |AY=DAY+C%..V.. D|
000008b0  41 59 3c 31 20 44 41 59  3d 37 0d 04 60 11 e7 20  |AY<1 DAY=7..`.. |
000008c0  44 41 59 3e 37 20 44 41  59 3d 31 0d 04 6a 0b fd  |DAY>7 DAY=1..j..|
000008d0  20 44 41 59 3c 36 0d 04  74 05 e1 0d 04 7e 05 3a  | DAY<6..t....~.:|
000008e0  0d 04 88 4d dd a4 76 61  6c 69 64 61 74 65 28 44  |...M..validate(D|
000008f0  2c 4d 2c 59 29 3a 3d 44  2a 4d 2a 28 4d 3c 31 33  |,M,Y):=D*M*(M<13|
00000900  29 2a 28 44 3c 33 31 2b  28 28 4d 2b 28 4d 3e 37  |)*(D<31+((M+(M>7|
00000910  29 29 80 20 31 29 2b 28  4d 3d 32 29 2a 28 32 2b  |)). 1)+(M=2)*(2+|
00000920  28 28 59 20 80 20 33 29  3d 30 29 29 29 0d 04 92  |((Y . 3)=0)))...|
00000930  05 3a 0d 04 9c 19 dd f2  63 68 65 63 6b 5f 61 6e  |.:......check_an|
00000940  64 5f 6f 70 65 6e 5f 66  69 6c 65 0d 04 a6 05 f5  |d_open_file.....|
00000950  0d 04 b0 1f 46 49 4c 45  25 3d ad 28 c3 28 79 65  |....FILE%=.(.(ye|
00000960  61 72 25 28 56 25 29 2a  31 30 2b 56 25 29 29 0d  |ar%(V%)*10+V%)).|
00000970  04 ba 0b 2a 46 58 32 31  2c 30 0d 04 c4 07 d9 23  |...*FX21,0.....#|
00000980  30 0d 04 ce 23 e7 20 46  49 4c 45 25 3d 30 20 59  |0...#. FILE%=0 Y|
00000990  3d 79 65 61 72 25 28 56  25 29 3a f2 6e 6f 74 66  |=year%(V%):.notf|
000009a0  6f 75 6e 64 0d 04 d8 0e  fd 20 46 49 4c 45 25 3c  |ound..... FILE%<|
000009b0  3e 30 0d 04 e2 1f 46 49  4c 45 25 3d ad 28 c3 28  |>0....FILE%=.(.(|
000009c0  79 65 61 72 25 28 56 25  29 2a 31 30 2b 56 25 29  |year%(V%)*10+V%)|
000009d0  29 0d 04 ec 0d cf 23 46  49 4c 45 25 3d 30 0d 04  |).....#FILE%=0..|
000009e0  f6 13 e3 20 49 25 3d 32  b8 6e 64 61 74 61 25 2b  |... I%=2.ndata%+|
000009f0  31 0d 05 00 0d 73 24 28  49 25 29 3d 22 22 0d 05  |1....s$(I%)=""..|
00000a00  0a 0c e3 20 4a 25 3d 31  b8 37 0d 05 14 0e 42 25  |... J%=1.7....B%|
00000a10  3d 9a 23 46 49 4c 45 25  0d 05 1e 1a e7 20 42 25  |=.#FILE%..... B%|
00000a20  3c 33 32 20 84 20 42 25  3e 31 32 36 20 42 25 3d  |<32 . B%>126 B%=|
00000a30  33 32 0d 05 28 17 73 24  28 49 25 29 3d 73 24 28  |32..(.s$(I%)=s$(|
00000a40  49 25 29 2b bd 28 42 25  29 0d 05 32 05 ed 0d 05  |I%)+.(B%)..2....|
00000a50  3c 05 ed 0d 05 46 27 f4  20 47 45 54 20 43 55 52  |<....F'. GET CUR|
00000a60  52 45 4e 54 20 44 41 54  45 20 41 4e 44 20 44 49  |RENT DATE AND DI|
00000a70  53 43 20 50 4f 49 4e 54  45 52 0d 05 50 18 cf 23  |SC POINTER..P..#|
00000a80  46 49 4c 45 25 3d 63 75  72 72 65 6e 74 64 61 74  |FILE%=currentdat|
00000a90  65 25 0d 05 5a 0d 44 3d  9a 23 46 49 4c 45 25 0d  |e%..Z.D=.#FILE%.|
00000aa0  05 64 0d 4d 3d 9a 23 46  49 4c 45 25 0d 05 6e 1b  |.d.M=.#FILE%..n.|
00000ab0  59 3d 28 9a 23 46 49 4c  45 25 29 2a 32 35 36 2b  |Y=(.#FILE%)*256+|
00000ac0  9a 23 46 49 4c 45 25 0d  05 78 0f 44 41 59 3d 9a  |.#FILE%..x.DAY=.|
00000ad0  23 46 49 4c 45 25 0d 05  82 22 64 69 73 63 70 74  |#FILE%..."discpt|
00000ae0  72 25 3d 28 9a 23 46 49  4c 45 25 29 2a 32 35 36  |r%=(.#FILE%)*256|
00000af0  2b 9a 23 46 49 4c 45 25  0d 05 8c 08 53 25 3d b9  |+.#FILE%....S%=.|
00000b00  0d 05 96 05 e1 0d 05 a0  05 3a 0d 05 aa 0b dd f2  |.........:......|
00000b10  61 75 74 6f 31 0d 05 b4  0c 54 45 58 54 24 3d 22  |auto1....TEXT$="|
00000b20  22 0d 05 be 08 5a 25 3d  30 0d 05 c8 0a 2a 54 54  |"....Z%=0....*TT|
00000b30  58 4f 4e 0d 05 d2 09 2a  42 42 43 31 0d 05 dc 08  |XON....*BBC1....|
00000b40  2a 48 4f 4e 0d 05 e6 05  f5 0d 05 f0 05 f5 0d 05  |*HON............|
00000b50  fa 0d 2a 50 41 47 45 20  31 33 30 0d 06 04 09 f2  |..*PAGE 130.....|
00000b60  64 61 74 61 0d 06 0e 0c  fd 20 a4 63 72 63 3c 32  |data..... .crc<2|
00000b70  0d 06 18 1b f1 8a 30 2c  39 29 bd 31 33 31 3b 27  |......0,9).131;'|
00000b80  bd 31 33 31 3b 27 bd 31  33 31 3b 0d 06 22 40 e7  |.131;'.131;.."@.|
00000b90  20 ac 20 a4 63 6c 6f 73  65 20 f1 8a 34 2c 31 30  | . .close ..4,10|
00000ba0  29 22 57 61 69 74 69 6e  67 20 75 6e 74 69 6c 20  |)"Waiting until |
00000bb0  63 6c 6f 73 65 20 6f 66  20 62 75 73 69 6e 65 73  |close of busines|
00000bc0  73 2e 22 3a f2 62 6f 72  64 65 72 0d 06 2c 0c fd  |s.":.border..,..|
00000bd0  20 a4 63 6c 6f 73 65 0d  06 36 05 db 0d 06 40 05  | .close..6....@.|
00000be0  f5 0d 06 4a 0e fd 20 a4  64 61 74 65 5f 6f 6b 0d  |...J.. .date_ok.|
00000bf0  06 54 0e f2 6c 6f 61 64  6e 61 6d 65 73 0d 06 5e  |.T..loadnames..^|
00000c00  13 e3 20 49 25 3d 30 b8  6e 64 61 74 61 25 2d 31  |.. I%=0.ndata%-1|
00000c10  0d 06 68 0c 46 25 28 49  25 29 3d a3 0d 06 72 1c  |..h.F%(I%)=...r.|
00000c20  f1 8a 30 2c 49 25 2b 32  29 bd 31 33 31 3b 53 48  |..0,I%+2).131;SH|
00000c30  41 52 45 24 28 49 25 29  0d 06 7c 05 ed 0d 06 86  |ARE$(I%)..|.....|
00000c40  26 f1 8a 31 38 2c 31 30  29 bd 31 33 31 3b 22 45  |&..18,10).131;"E|
00000c50  6e 74 65 72 69 6e 67 20  64 61 74 61 20 66 6f 72  |ntering data for|
00000c60  3a 2d 22 0d 06 90 1e f1  8a 32 30 2c 31 33 29 bd  |:-"......20,13).|
00000c70  31 33 31 3b 44 3b 22 2f  22 3b 4d 3b 22 2f 22 3b  |131;D;"/";M;"/";|
00000c80  59 0d 06 9a 05 f5 0d 06  a4 05 f5 0d 06 ae 05 f5  |Y...............|
00000c90  0d 06 b8 0d 2a 50 41 47  45 20 31 33 30 0d 06 c2  |....*PAGE 130...|
00000ca0  09 f2 64 61 74 61 0d 06  cc 0c fd 20 a4 63 72 63  |..data..... .crc|
00000cb0  3c 32 0d 06 d6 0c fd 20  a4 63 6c 6f 73 65 0d 06  |<2..... .close..|
00000cc0  e0 10 50 41 25 3d a4 73  75 62 70 61 67 65 0d 06  |..PA%=.subpage..|
00000cd0  ea 1f f1 8a 32 35 2c 31  29 bd 31 33 30 3b 22 53  |....25,1).130;"S|
00000ce0  75 62 2d 70 61 67 65 20  22 3b 50 41 25 0d 06 f4  |ub-page ";PA%...|
00000cf0  08 d6 6d 63 25 0d 06 fe  0d e3 20 52 25 3d 35 b8  |..mc%..... R%=5.|
00000d00  31 39 0d 07 08 18 f2 67  65 74 74 65 78 74 28 62  |19.....gettext(b|
00000d10  6c 6f 63 6b 33 25 2c 52  25 29 0d 07 12 0b f2 73  |lock3%,R%).....s|
00000d20  65 61 72 63 68 0d 07 1c  05 ed 0d 07 26 0f 53 55  |earch.......&.SU|
00000d30  42 25 28 50 41 25 29 3d  b9 0d 07 30 41 fd 5a 25  |B%(PA%)=...0A.Z%|
00000d40  3d 32 30 20 84 20 53 55  42 25 28 31 29 2b 53 55  |=20 . SUB%(1)+SU|
00000d50  42 25 28 32 29 2b 53 55  42 25 28 33 29 2b 53 55  |B%(2)+SUB%(3)+SU|
00000d60  42 25 28 34 29 2b 53 55  42 25 28 35 29 2b 53 55  |B%(4)+SUB%(5)+SU|
00000d70  42 25 28 36 29 3d 28 2d  36 29 0d 07 3a 0b f1 8a  |B%(6)=(-6)..:...|
00000d80  30 2c 32 31 29 0d 07 44  0b 2a 54 54 58 4f 46 46  |0,21)..D.*TTXOFF|
00000d90  0d 07 4e 05 e1 0d 07 58  05 3a 0d 07 62 0c dd f2  |..N....X.:..b...|
00000da0  62 6f 72 64 65 72 0d 07  6c 0c e3 20 4a 25 3d 30  |border..l.. J%=0|
00000db0  b8 31 0d 07 76 1c e7 20  4a 25 3d 30 20 54 31 24  |.1..v.. J%=0 T1$|
00000dc0  3d 22 5f 22 20 8b 20 54  31 24 3d 22 20 22 0d 07  |="_" . T1$=" "..|
00000dd0  80 1c e7 20 4a 25 3d 30  20 54 32 24 3d 22 49 22  |... J%=0 T2$="I"|
00000de0  20 8b 20 54 32 24 3d 22  20 22 0d 07 8a 0f e3 20  | . T2$=" "..... |
00000df0  49 25 3d 32 20 b8 20 33  37 0d 07 94 0a f2 64 65  |I%=2 . 37.....de|
00000e00  6c 61 79 0d 07 9e 10 f1  8a 49 25 2c 31 31 29 54  |lay......I%,11)T|
00000e10  31 24 3b 0d 07 a8 05 ed  0d 07 b2 10 f1 8a 33 37  |1$;...........37|
00000e20  2c 31 30 29 54 32 24 3b  0d 07 bc 14 e3 20 49 25  |,10)T2$;..... I%|
00000e30  3d 33 37 20 b8 20 32 20  88 20 2d 31 0d 07 c6 0a  |=37 . 2 . -1....|
00000e40  f2 64 65 6c 61 79 0d 07  d0 0f f1 8a 49 25 2c 39  |.delay......I%,9|
00000e50  29 54 31 24 3b 0d 07 da  05 ed 0d 07 e4 0f f1 8a  |)T1$;...........|
00000e60  32 2c 31 30 29 54 32 24  3b 0d 07 ee 05 ed 0d 07  |2,10)T2$;.......|
00000e70  f8 05 e1 0d 08 02 05 3a  0d 08 0c 0a dd f2 64 61  |.......:......da|
00000e80  74 61 0d 08 16 1d 24 6c  69 6e 65 3d 22 44 41 54  |ta....$line="DAT|
00000e90  41 20 22 2b c3 7e 28 62  6c 6f 63 6b 33 25 29 0d  |A "+.~(block3%).|
00000ea0  08 20 11 58 25 3d 6c 69  6e 65 20 83 20 32 35 36  |. .X%=line . 256|
00000eb0  0d 08 2a 11 59 25 3d 6c  69 6e 65 20 81 20 32 35  |..*.Y%=line . 25|
00000ec0  36 0d 08 34 0a d6 26 46  46 46 37 0d 08 3e 05 e1  |6..4..&FFF7..>..|
00000ed0  0d 08 48 05 3a 0d 08 52  0b dd f2 61 75 74 6f 30  |..H.:..R...auto0|
00000ee0  0d 08 5c 0c 54 45 58 54  24 3d 22 22 0d 08 66 0a  |..\.TEXT$=""..f.|
00000ef0  2a 54 54 58 4f 4e 0d 08  70 09 2a 42 42 43 31 0d  |*TTXON..p.*BBC1.|
00000f00  08 7a 08 2a 48 4f 4e 0d  08 84 0d 2a 50 41 47 45  |.z.*HON....*PAGE|
00000f10  20 31 32 35 0d 08 8e 05  f5 0d 08 98 0e fd 20 a4  | 125.......... .|
00000f20  64 61 74 65 5f 6f 6b 0d  08 a2 1b f1 8a 35 2c 31  |date_ok......5,1|
00000f30  32 29 bd 31 33 31 3b 22  46 54 2d 53 45 20 31 30  |2).131;"FT-SE 10|
00000f40  30 22 0d 08 ac 05 f5 0d  08 b6 0d 2a 50 41 47 45  |0".........*PAGE|
00000f50  20 31 32 35 0d 08 c0 09  f2 64 61 74 61 0d 08 ca  | 125.....data...|
00000f60  16 73 75 62 5f 70 61 67  65 25 3d a4 73 75 62 70  |.sub_page%=.subp|
00000f70  61 67 65 0d 08 d4 25 f1  8a 32 35 2c 31 29 bd 31  |age...%..25,1).1|
00000f80  33 30 3b 22 53 75 62 2d  70 61 67 65 20 22 3b 73  |30;"Sub-page ";s|
00000f90  75 62 5f 70 61 67 65 25  0d 08 de 1a fd 20 a4 63  |ub_page%..... .c|
00000fa0  72 63 3c 32 20 80 20 73  75 62 5f 70 61 67 65 25  |rc<2 . sub_page%|
00000fb0  3d 32 0d 08 e8 08 d6 6d  63 25 0d 08 f2 09 4c 25  |=2.....mc%....L%|
00000fc0  3d 32 31 0d 08 fc 18 f2  67 65 74 74 65 78 74 28  |=21.....gettext(|
00000fd0  62 6c 6f 63 6b 33 25 2c  4c 25 29 0d 09 06 0c f2  |block3%,L%).....|
00000fe0  73 65 61 72 63 68 31 0d  09 10 0b 2a 54 54 58 4f  |search1....*TTXO|
00000ff0  46 46 0d 09 1a 05 e1 0d  09 24 05 3a 0d 09 2e 1c  |FF.......$.:....|
00001000  dd f2 67 65 74 74 65 78  74 28 61 64 64 72 65 73  |..gettext(addres|
00001010  73 25 2c 72 6f 77 25 29  0d 09 38 11 54 45 58 54  |s%,row%)..8.TEXT|
00001020  24 3d 22 22 3a 49 25 3d  30 0d 09 42 05 f5 0d 09  |$="":I%=0..B....|
00001030  4c 1d 70 6f 69 6e 74 65  72 25 3d 61 64 64 72 65  |L.pointer%=addre|
00001040  73 73 25 2b 31 2b 49 25  2a 34 32 0d 09 56 0b 49  |ss%+1+I%*42..V.I|
00001050  25 3d 49 25 2b 31 0d 09  60 1c fd 20 3f 70 6f 69  |%=I%+1..`.. ?poi|
00001060  6e 74 65 72 25 3d 72 6f  77 25 20 84 20 49 25 3d  |nter%=row% . I%=|
00001070  32 34 0d 09 6a 2e e7 20  49 25 3c 32 34 20 70 6f  |24..j.. I%<24 po|
00001080  69 6e 74 65 72 25 3f 34  31 3d 31 33 3a 54 45 58  |inter%?41=13:TEX|
00001090  54 24 3d 24 28 70 6f 69  6e 74 65 72 25 2b 32 29  |T$=$(pointer%+2)|
000010a0  0d 09 74 05 e1 0d 09 7e  05 3a 0d 09 88 0c dd f2  |..t....~.:......|
000010b0  73 65 61 72 63 68 0d 09  92 13 e7 20 53 55 42 25  |search..... SUB%|
000010c0  28 50 41 25 29 20 8c 20  e1 0d 09 9c 14 e3 20 4a  |(PA%) . ...... J|
000010d0  25 3d 31 20 b8 20 32 31  20 88 20 32 30 0d 09 a6  |%=1 . 21 . 20...|
000010e0  0d e3 20 49 25 3d 30 b8  31 39 0d 09 b0 21 e7 20  |.. I%=0.19...!. |
000010f0  53 48 41 52 45 24 28 49  25 29 3d 22 20 20 20 20  |SHARE$(I%)="    |
00001100  20 20 20 22 20 e5 20 8d  64 44 49 0d 09 ba 24 e7  |   " . .dDI...$.|
00001110  20 53 48 41 52 45 24 28  49 25 29 3d c1 54 45 58  | SHARE$(I%)=.TEX|
00001120  54 24 2c 4a 25 2c 37 29  20 f2 66 6f 75 6e 64 0d  |T$,J%,7) .found.|
00001130  09 c4 05 ed 0d 09 ce 05  ed 0d 09 d8 05 e1 0d 09  |................|
00001140  e2 05 3a 0d 09 ec 0d dd  f2 73 65 61 72 63 68 31  |..:......search1|
00001150  0d 09 f6 1d 70 72 69 63  65 25 28 30 29 3d bb 28  |....price%(0)=.(|
00001160  c1 54 45 58 54 24 2c 32  36 2c 35 29 29 0d 0a 00  |.TEXT$,26,5))...|
00001170  15 f1 8a 31 36 2c 31 32  29 70 72 69 63 65 25 28  |...16,12)price%(|
00001180  30 29 0d 0a 0a 0b 5a 25  3d 5a 25 2b 31 0d 0a 14  |0)....Z%=Z%+1...|
00001190  05 e1 0d 0a 1e 05 3a 0d  0a 28 0b dd f2 66 6f 75  |......:..(...fou|
000011a0  6e 64 0d 0a 32 23 e7 20  46 25 28 49 25 29 3d a3  |nd..2#. F%(I%)=.|
000011b0  20 5a 25 3d 5a 25 2b 31  3a 46 25 28 49 25 29 3d  | Z%=Z%+1:F%(I%)=|
000011c0  b9 3a 8b 20 e1 0d 0a 3c  24 f1 8a 30 2c 31 29 bd  |.:. ...<$..0,1).|
000011d0  31 32 39 3b 22 46 6f 75  6e 64 20 22 3b 5a 25 3b  |129;"Found ";Z%;|
000011e0  22 20 73 68 61 72 65 73  22 0d 0a 46 0b 53 25 3d  |" shares"..F.S%=|
000011f0  4a 25 2b 36 0d 0a 50 05  f5 0d 0a 5a 0b 53 25 3d  |J%+6..P....Z.S%=|
00001200  53 25 2b 31 0d 0a 64 2d  fd 20 97 28 c1 54 45 58  |S%+1..d-. .(.TEX|
00001210  54 24 2c 53 25 2c 31 29  29 3e 34 37 20 80 20 97  |T$,S%,1))>47 . .|
00001220  28 c1 54 45 58 54 24 2c  53 25 2c 31 29 29 3c 35  |(.TEXT$,S%,1))<5|
00001230  38 0d 0a 6e 09 45 25 3d  53 25 0d 0a 78 05 f5 0d  |8..n.E%=S%..x...|
00001240  0a 82 0b 45 25 3d 45 25  2b 31 0d 0a 8c 16 fd 20  |...E%=E%+1..... |
00001250  c1 54 45 58 54 24 2c 45  25 2c 31 29 3d 22 20 22  |.TEXT$,E%,1)=" "|
00001260  0d 0a 96 0b 45 25 3d 45  25 2d 31 0d 0a a0 24 70  |....E%=E%-1...$p|
00001270  72 69 63 65 25 28 49 25  29 3d bb 28 c1 54 45 58  |rice%(I%)=.(.TEX|
00001280  54 24 2c 53 25 2c 45 25  2d 53 25 2b 31 29 29 0d  |T$,S%,E%-S%+1)).|
00001290  0a aa 1d f1 8a 31 30 2c  49 25 2b 32 29 bd 31 33  |.....10,I%+2).13|
000012a0  31 3b 70 72 69 63 65 25  28 49 25 29 0d 0a b4 05  |1;price%(I%)....|
000012b0  e1 0d 0a be 05 3a 0d 0a  c8 0b dd a4 63 6c 6f 73  |.....:......clos|
000012c0  65 0d 0a d2 43 f4 20 4c  6f 6f 6b 20 66 6f 72 20  |e...C. Look for |
000012d0  74 68 65 20 74 65 78 74  20 73 74 72 69 6e 67 20  |the text string |
000012e0  22 43 6c 6f 73 65 22 20  73 74 61 72 74 69 6e 67  |"Close" starting|
000012f0  20 61 74 20 6c 6f 63 61  74 69 6f 6e 20 62 6c 6f  | at location blo|
00001300  63 6b 33 25 0d 0a dc 1f  e3 20 4a 25 3d 62 6c 6f  |ck3%..... J%=blo|
00001310  63 6b 33 25 20 b8 20 62  6c 6f 63 6b 33 25 2b 26  |ck3% . block3%+&|
00001320  38 30 30 0d 0a e6 0c 54  45 58 54 24 3d 22 22 0d  |800....TEXT$="".|
00001330  0a f0 12 e3 20 49 25 3d  4a 25 20 b8 20 4a 25 2b  |.... I%=J% . J%+|
00001340  34 0d 0a fa 1c 54 45 58  54 24 3d 54 45 58 54 24  |4....TEXT$=TEXT$|
00001350  2b bd 28 3f 49 25 20 80  20 31 32 37 29 0d 0b 04  |+.(?I% . 127)...|
00001360  05 ed 0d 0b 0e 2b e7 20  54 45 58 54 24 3d 22 43  |.....+. TEXT$="C|
00001370  6c 6f 73 65 22 20 84 20  54 45 58 54 24 3d 22 63  |lose" . TEXT$="c|
00001380  6c 6f 73 65 22 4a 25 3d  26 46 46 46 46 0d 0b 18  |lose"J%=&FFFF...|
00001390  05 ed 0d 0b 22 16 e7 20  4a 25 3e 26 46 46 46 45  |....".. J%>&FFFE|
000013a0  20 3d b9 20 8b 20 3d a3  0d 0b 2c 05 3a 0d 0b 36  | =. . =...,.:..6|
000013b0  0d dd a4 64 61 74 65 5f  6f 6b 0d 0b 40 14 f4 22  |...date_ok..@.."|
000013c0  81 44 41 54 45 20 57 49  54 48 20 41 54 53 0d 0b  |.DATE WITH ATS..|
000013d0  4a 0f d1 3d 30 3a f5 fd  91 3e 31 32 30 0d 0b 54  |J..=0:...>120..T|
000013e0  3b 41 25 3d 26 37 41 3a  58 25 3d 62 6c 6f 63 6b  |;A%=&7A:X%=block|
000013f0  31 25 83 32 35 36 3a 59  25 3d 62 6c 6f 63 6b 31  |1%.256:Y%=block1|
00001400  25 81 32 35 36 3a 3f 62  6c 6f 63 6b 31 25 3d 31  |%.256:?block1%=1|
00001410  35 3a d6 26 46 46 46 31  0d 0b 5e 1a 42 42 31 24  |5:.&FFF1..^.BB1$|
00001420  3d c2 c3 7e 28 62 6c 6f  63 6b 31 25 3f 38 29 2c  |=..~(block1%?8),|
00001430  31 29 0d 0b 68 30 42 42  32 24 3d c3 7e 28 62 6c  |1)..h0BB2$=.~(bl|
00001440  6f 63 6b 31 25 3f 39 29  3a e7 20 a9 28 42 42 32  |ock1%?9):. .(BB2|
00001450  24 29 3d 31 20 42 42 32  24 3d 22 30 22 2b 42 42  |$)=1 BB2$="0"+BB|
00001460  32 24 0d 0b 72 31 42 42  33 24 3d c3 7e 28 62 6c  |2$..r1BB3$=.~(bl|
00001470  6f 63 6b 31 25 3f 31 30  29 3a e7 20 a9 28 42 42  |ock1%?10):. .(BB|
00001480  33 24 29 3d 31 20 42 42  33 24 3d 22 30 22 2b 42  |3$)=1 BB3$="0"+B|
00001490  42 33 24 0d 0b 7c 18 4a  44 3d bb 28 42 42 31 24  |B3$..|.JD=.(BB1$|
000014a0  2b 42 42 32 24 2b 42 42  33 24 29 0d 0b 86 1f 79  |+BB2$+BB3$)....y|
000014b0  25 3d 28 31 30 30 2a 28  4a 44 2d 31 35 30 37 38  |%=(100*(JD-15078|
000014c0  2e 32 29 29 81 33 36 35  32 35 0d 0b 90 2b 6d 25  |.2)).36525...+m%|
000014d0  3d a8 28 28 4a 44 2d 31  34 39 35 36 2e 31 2d a8  |=.((JD-14956.1-.|
000014e0  28 33 36 35 2e 32 35 2a  79 25 29 29 2f 33 30 2e  |(365.25*y%))/30.|
000014f0  36 30 30 31 29 0d 0b 9a  3c 64 25 3d 4a 44 2d 31  |6001)...<d%=JD-1|
00001500  34 39 35 36 2d a8 28 33  36 35 2e 32 35 2a 79 25  |4956-.(365.25*y%|
00001510  29 2d a8 28 33 30 2e 36  2a 6d 25 29 3a 4b 3d a8  |)-.(30.6*m%):K=.|
00001520  28 30 2e 37 2b 28 31 2f  28 31 37 2d 6d 25 29 29  |(0.7+(1/(17-m%))|
00001530  29 0d 0b a4 10 6d 25 3d  6d 25 2d 31 2d 31 32 2a  |)....m%=m%-1-12*|
00001540  4b 0d 0b ae 0e 79 25 3d  79 25 2b 31 39 30 30 0d  |K....y%=y%+1900.|
00001550  0b b8 1a 64 64 25 3d 79  25 2a 31 30 30 30 30 2b  |...dd%=y%*10000+|
00001560  6d 25 2a 31 30 30 2b 64  25 0d 0b c2 05 f4 0d 0b  |m%*100+d%.......|
00001570  cc 1a f4 20 47 65 74 20  68 6f 75 72 20 66 72 6f  |... Get hour fro|
00001580  6d 20 43 45 45 46 41 58  0d 0b d6 05 f4 0d 0b e0  |m CEEFAX........|
00001590  0f 3f 62 6c 6f 63 6b 31  25 3d 32 31 0d 0b ea 14  |.?block1%=21....|
000015a0  58 25 3d 62 6c 6f 63 6b  31 25 20 83 20 32 35 36  |X%=block1% . 256|
000015b0  0d 0b f4 14 59 25 3d 62  6c 6f 63 6b 31 25 20 81  |....Y%=block1% .|
000015c0  20 32 35 36 0d 0b fe 0a  41 25 3d 26 37 41 0d 0c  | 256....A%=&7A..|
000015d0  08 05 f5 0d 0c 12 0a d6  26 46 46 46 31 0d 0c 1c  |........&FFF1...|
000015e0  12 fd 20 62 6c 6f 63 6b  31 25 3f 31 30 3d 30 0d  |.. block1%?10=0.|
000015f0  0c 26 24 68 72 25 3d bb  28 bd 28 62 6c 6f 63 6b  |.&$hr%=.(.(block|
00001600  31 25 3f 31 29 2b bd 28  62 6c 6f 63 6b 31 25 3f  |1%?1)+.(block1%?|
00001610  32 29 29 0d 0c 30 16 e7  20 68 72 25 3c 31 30 20  |2))..0.. hr%<10 |
00001620  64 64 25 3d 64 64 25 2d  31 0d 0c 3a 05 f5 0d 0c  |dd%=dd%-1..:....|
00001630  44 16 44 25 3d 59 2a 31  30 30 30 30 2b 4d 2a 31  |D.D%=Y*10000+M*1|
00001640  30 30 2b 44 0d 0c 4e 1c  e7 20 44 25 3c 64 64 25  |00+D..N.. D%<dd%|
00001650  20 f2 63 68 61 6e 67 65  5f 64 61 74 65 28 31 29  | .change_date(1)|
00001660  0d 0c 58 0d fd 20 44 25  3e 3d 64 64 25 0d 0c 62  |..X.. D%>=dd%..b|
00001670  05 f5 0d 0c 6c 16 44 25  3d 59 2a 31 30 30 30 30  |....l.D%=Y*10000|
00001680  2b 4d 2a 31 30 30 2b 44  0d 0c 76 1d e7 20 44 25  |+M*100+D..v.. D%|
00001690  3e 64 64 25 20 f2 63 68  61 6e 67 65 5f 64 61 74  |>dd% .change_dat|
000016a0  65 28 2d 31 29 0d 0c 80  0d fd 20 44 25 3c 3d 64  |e(-1)..... D%<=d|
000016b0  64 25 0d 0c 8a 06 3d b9  0d 0c 94 05 3a 0d 0c 9e  |d%....=.....:...|
000016c0  0c dd f2 73 74 61 74 75  73 0d 0c a8 05 f5 0d 0c  |...status.......|
000016d0  b2 0f 3f 62 6c 6f 63 6b  31 25 3d 31 37 0d 0c bc  |..?block1%=17...|
000016e0  11 62 6c 6f 63 6b 31 25  3f 31 3d 26 46 45 0d 0c  |.block1%?1=&FE..|
000016f0  c6 14 58 25 3d 62 6c 6f  63 6b 31 25 20 83 20 32  |..X%=block1% . 2|
00001700  35 36 0d 0c d0 14 59 25  3d 62 6c 6f 63 6b 31 25  |56....Y%=block1%|
00001710  20 81 20 32 35 36 0d 0c  da 0a 41 25 3d 26 37 41  | . 256....A%=&7A|
00001720  0d 0c e4 0a d6 26 46 46  46 31 0d 0c ee 63 e7 20  |.....&FFF1...c. |
00001730  62 6c 6f 63 6b 31 25 3f  31 3d 31 20 f1 8a 30 2c  |block1%?1=1 ..0,|
00001740  31 30 29 bd 31 32 39 3b  22 54 65 6c 65 74 65 78  |10).129;"Teletex|
00001750  74 20 41 64 61 70 74 6f  72 20 6f 6e 2c 20 62 75  |t Adaptor on, bu|
00001760  74 20 6e 6f 20 73 69 67  6e 61 6c 2e 22 27 27 bd  |t no signal."''.|
00001770  31 32 39 3b 22 43 68 65  63 6b 20 74 75 6e 69 6e  |129;"Check tunin|
00001780  67 20 6f 72 20 61 65 72  69 61 6c 2e 22 0d 0c f8  |g or aerial."...|
00001790  83 e7 20 62 6c 6f 63 6b  31 25 3f 31 3d 32 20 f1  |.. block1%?1=2 .|
000017a0  8a 30 2c 31 30 29 bd 31  32 39 3b 22 54 65 6c 65  |.0,10).129;"Tele|
000017b0  74 65 78 74 20 41 64 61  70 74 6f 72 20 63 6f 6e  |text Adaptor con|
000017c0  6e 65 63 74 65 64 2c 22  27 bd 31 32 39 3b 22 62  |nected,"'.129;"b|
000017d0  75 74 20 73 77 69 74 63  68 65 64 20 6f 66 66 2e  |ut switched off.|
000017e0  22 27 bd 31 32 39 3b 22  53 77 69 74 63 68 20 6f  |"'.129;"Switch o|
000017f0  6e 2c 20 70 72 65 73 73  20 42 52 45 41 4b 20 61  |n, press BREAK a|
00001800  6e 64 20 73 74 61 72 74  20 61 67 61 69 6e 2e 22  |nd start again."|
00001810  0d 0d 02 40 e7 20 62 6c  6f 63 6b 31 25 3f 31 3d  |...@. block1%?1=|
00001820  26 46 46 20 f1 8a 30 2c  31 30 29 bd 31 32 39 3b  |&FF ..0,10).129;|
00001830  22 4e 6f 20 54 65 6c 65  74 65 78 74 20 41 64 61  |"No Teletext Ada|
00001840  70 74 6f 72 20 63 6f 6e  6e 65 63 74 65 64 2e 22  |ptor connected."|
00001850  0d 0d 0c 59 e7 20 62 6c  6f 63 6b 31 25 3f 31 3d  |...Y. block1%?1=|
00001860  26 46 45 20 f1 8a 37 2c  31 30 29 bd 31 33 31 3b  |&FE ..7,10).131;|
00001870  22 4e 4f 20 41 54 53 20  52 4f 4d 20 49 4e 53 54  |"NO ATS ROM INST|
00001880  41 4c 4c 45 44 22 27 27  8a 35 29 bd 31 33 31 3b  |ALLED"''.5).131;|
00001890  22 49 4e 53 54 41 4c 4c  20 41 4e 44 20 53 54 41  |"INSTALL AND STA|
000018a0  52 54 20 41 47 41 49 4e  22 0d 0d 16 10 fd 62 6c  |RT AGAIN".....bl|
000018b0  6f 63 6b 31 25 3f 31 3d  30 0d 0d 20 05 e1 0d 0d  |ock1%?1=0.. ....|
000018c0  2a 05 3a 0d 0d 34 09 dd  a4 63 72 63 0d 0d 3e 0f  |*.:..4...crc..>.|
000018d0  3f 62 6c 6f 63 6b 31 25  3d 32 33 0d 0d 48 1b 62  |?block1%=23..H.b|
000018e0  6c 6f 63 6b 31 25 3f 31  3d 62 6c 6f 63 6b 33 25  |lock1%?1=block3%|
000018f0  20 83 20 32 35 36 0d 0d  52 1b 62 6c 6f 63 6b 31  | . 256..R.block1|
00001900  25 3f 32 3d 62 6c 6f 63  6b 33 25 20 81 20 32 35  |%?2=block3% . 25|
00001910  36 0d 0d 5c 14 58 25 3d  62 6c 6f 63 6b 31 25 20  |6..\.X%=block1% |
00001920  83 20 32 35 36 0d 0d 66  14 59 25 3d 62 6c 6f 63  |. 256..f.Y%=bloc|
00001930  6b 31 25 20 81 20 32 35  36 0d 0d 70 0a 41 25 3d  |k1% . 256..p.A%=|
00001940  26 37 41 0d 0d 7a 0a d6  26 46 46 46 31 0d 0d 84  |&7A..z..&FFF1...|
00001950  10 f1 8a 32 30 2c 35 29  89 28 31 36 29 0d 0d 8e  |...20,5).(16)...|
00001960  31 e7 20 62 6c 6f 63 6b  31 25 3f 33 3d 26 46 46  |1. block1%?3=&FF|
00001970  20 f1 8a 32 30 2c 35 29  bd 31 32 39 3b 22 43 52  | ..20,5).129;"CR|
00001980  43 20 45 52 52 4f 52 2e  20 20 20 20 20 22 0d 0d  |C ERROR.     "..|
00001990  98 2f e7 20 62 6c 6f 63  6b 31 25 3f 33 3d 30 20  |./. block1%?3=0 |
000019a0  f1 8a 32 30 2c 35 29 bd  31 32 39 3b 22 57 41 52  |..20,5).129;"WAR|
000019b0  4e 49 4e 47 3a 2d 4e 4f  20 43 52 43 22 0d 0d a2  |NING:-NO CRC"...|
000019c0  0e 3d 62 6c 6f 63 6b 31  25 3f 33 0d 0d ac 05 3a  |.=block1%?3....:|
000019d0  0d 0d b6 0b dd f2 64 65  6c 61 79 0d 0d c0 07 d1  |......delay.....|
000019e0  3d 30 0d 0d ca 0a f5 fd  91 3e 31 30 0d 0d d4 05  |=0.......>10....|
000019f0  e1 0d 0d de 05 3a 0d 0d  e8 0f dd f2 6c 6f 61 64  |.....:......load|
00001a00  6e 61 6d 65 73 0d 0d f2  0d cf 23 46 49 4c 45 25  |names.....#FILE%|
00001a10  3d 30 0d 0d fc 13 e3 20  49 25 3d 30 b8 6e 64 61  |=0..... I%=0.nda|
00001a20  74 61 25 2d 31 0d 0e 06  11 53 48 41 52 45 24 28  |ta%-1....SHARE$(|
00001a30  49 25 29 3d 22 22 0d 0e  10 0c e3 20 4a 25 3d 30  |I%)=""..... J%=0|
00001a40  b8 36 0d 0e 1a 0e 48 25  3d 9a 23 46 49 4c 45 25  |.6....H%=.#FILE%|
00001a50  0d 0e 24 1f 53 48 41 52  45 24 28 49 25 29 3d 53  |..$.SHARE$(I%)=S|
00001a60  48 41 52 45 24 28 49 25  29 2b bd 28 48 25 29 0d  |HARE$(I%)+.(H%).|
00001a70  0e 2e 05 ed 0d 0e 38 05  ed 0d 0e 42 05 e1 0d 0e  |......8....B....|
00001a80  4c 05 3a 0d 0e 56 0d dd  a4 73 75 62 70 61 67 65  |L.:..V...subpage|
00001a90  0d 0e 60 0e 3d 62 6c 6f  63 6b 33 25 3f 34 0d 0e  |..`.=block3%?4..|
00001aa0  6a 05 3a 0d 0e 74 0c dd  f2 66 69 6e 69 73 68 0d  |j.:..t...finish.|
00001ab0  0e 7e 0b 2a 54 54 58 4f  46 46 0d 0e 88 05 db 0d  |.~.*TTXOFF......|
00001ac0  0e 92 a0 f1 8a 30 2c 31  30 29 bd 31 33 31 3b 22  |.....0,10).131;"|
00001ad0  50 6f 72 74 66 6f 6c 69  6f 20 22 3b 56 25 3b 22  |Portfolio ";V%;"|
00001ae0  20 73 74 61 72 74 73 20  6f 6e 20 22 3b 44 3b 22  | starts on ";D;"|
00001af0  2f 22 3b 4d 3b 22 2f 22  3b 59 27 bd 31 33 31 3b  |/";M;"/";Y'.131;|
00001b00  22 61 6e 64 20 74 68 65  20 43 45 45 46 41 58 20  |"and the CEEFAX |
00001b10  64 61 74 65 20 69 73 20  22 3b 64 25 3b 22 2f 22  |date is ";d%;"/"|
00001b20  3b 6d 25 3b 22 2f 22 3b  79 25 27 27 bd 31 33 31  |;m%;"/";y%''.131|
00001b30  3b 22 46 41 54 41 4c 20  45 52 52 4f 52 22 27 bd  |;"FATAL ERROR"'.|
00001b40  31 33 31 3b 22 50 72 6f  67 72 61 6d 20 74 65 72  |131;"Program ter|
00001b50  6d 69 6e 61 74 69 6e 67  22 3a ef 32 31 3a e0 0d  |minating":.21:..|
00001b60  0e 9c 05 3a 0d 0e a6 09  dd f2 6b 65 79 0d 0e b0  |...:......key...|
00001b70  13 f1 27 22 50 52 45 53  53 20 41 20 4b 45 59 22  |..'"PRESS A KEY"|
00001b80  0d 0e ba 0b 2a 46 58 32  31 2c 30 0d 0e c4 08 4b  |....*FX21,0....K|
00001b90  25 3d a5 0d 0e ce 05 e1  0d 0e d8 05 3a 0d 0e e2  |%=..........:...|
00001ba0  0b dd a4 64 72 69 76 65  0d 0e ec 14 58 25 3d 62  |...drive....X%=b|
00001bb0  6c 6f 63 6b 31 25 20 83  20 32 35 36 0d 0e f6 14  |lock1% . 256....|
00001bc0  59 25 3d 62 6c 6f 63 6b  31 25 20 81 20 32 35 36  |Y%=block1% . 256|
00001bd0  0d 0f 00 08 41 25 3d 36  0d 0f 0a 0d e3 20 49 25  |....A%=6..... I%|
00001be0  3d 30 b8 31 31 0d 0f 14  10 62 6c 6f 63 6b 31 25  |=0.11....block1%|
00001bf0  3f 49 25 3d 30 0d 0f 1e  05 ed 0d 0f 28 1b 62 6c  |?I%=0.......(.bl|
00001c00  6f 63 6b 31 25 3f 32 3d  62 6c 6f 63 6b 33 25 20  |ock1%?2=block3% |
00001c10  81 20 32 35 36 0d 0f 32  1b 62 6c 6f 63 6b 31 25  |. 256..2.block1%|
00001c20  3f 31 3d 62 6c 6f 63 6b  33 25 20 83 20 32 35 36  |?1=block3% . 256|
00001c30  0d 0f 3c 10 62 6c 6f 63  6b 31 25 3f 31 32 3d 31  |..<.block1%?12=1|
00001c40  0d 0f 46 0a d6 26 46 46  44 31 0d 0f 50 13 3d 28  |..F..&FFD1..P.=(|
00001c50  62 6c 6f 63 6b 33 25 3f  31 29 2d 34 38 0d 0f 5a  |block3%?1)-48..Z|
00001c60  05 3a 0d 0f 64 0e dd f2  6e 6f 74 66 6f 75 6e 64  |.:..d...notfound|
00001c70  0d 0f 6e 0b 2a 54 54 58  4f 46 46 0d 0f 78 05 db  |..n.*TTXOFF..x..|
00001c80  0d 0f 82 0f 79 65 61 72  25 28 56 25 29 3d 59 0d  |....year%(V%)=Y.|
00001c90  0f 8c 07 d9 23 30 0d 0f  96 09 66 24 3d 22 22 0d  |....#0....f$="".|
00001ca0  0f a0 2c e7 20 56 25 3d  30 20 66 24 3d 22 49 6e  |..,. V%=0 f$="In|
00001cb0  64 65 78 20 64 61 74 61  22 20 8b 20 66 24 3d 70  |dex data" . f$=p|
00001cc0  24 2b 22 20 22 2b c3 28  56 25 29 0d 0f aa 1e 66  |$+" "+.(V%)....f|
00001cd0  24 3d 66 24 2b 22 20 66  6f 72 20 22 2b c3 28 79  |$=f$+" for "+.(y|
00001ce0  65 61 72 25 28 56 25 29  29 0d 0f b4 28 e7 20 79  |ear%(V%))...(. y|
00001cf0  65 61 72 25 28 56 25 29  3d 30 20 80 20 56 25 3d  |ear%(V%)=0 . V%=|
00001d00  30 20 66 24 3d 22 49 6e  64 65 78 20 64 61 74 61  |0 f$="Index data|
00001d10  22 0d 0f be 2d e7 20 79  65 61 72 25 28 56 25 29  |"...-. year%(V%)|
00001d20  3d 30 20 80 20 56 25 3c  3e 30 20 66 24 3d 22 50  |=0 . V%<>0 f$="P|
00001d30  6f 72 74 66 6f 6c 69 6f  20 64 61 74 61 22 0d 0f  |ortfolio data"..|
00001d40  c8 05 f5 0d 0f d2 22 f1  8a 30 2c 35 29 66 24 3b  |......"..0,5)f$;|
00001d50  22 20 6e 6f 74 20 6f 6e  20 74 68 69 73 20 64 69  |" not on this di|
00001d60  73 63 3a 2d 22 0d 0f dc  05 f5 0d 0f e6 ae f1 8a  |sc:-"...........|
00001d70  32 2c 38 29 22 41 29 20  28 41 29 62 61 6e 64 6f  |2,8)"A) (A)bando|
00001d80  6e 22 27 27 8a 32 29 22  43 29 20 28 43 29 61 74  |n"''.2)"C) (C)at|
00001d90  61 6c 6f 67 75 65 20 64  69 73 63 22 27 27 8a 32  |alogue disc"''.2|
00001da0  29 22 44 29 20 28 44 29  72 69 76 65 20 63 68 61  |)"D) (D)rive cha|
00001db0  6e 67 65 20 28 63 75 72  72 65 6e 74 6c 79 20 44  |nge (currently D|
00001dc0  72 69 76 65 20 22 3b a4  64 72 69 76 65 3b 22 29  |rive ";.drive;")|
00001dd0  22 27 27 8a 32 29 22 47  29 20 28 47 29 6f 20 6f  |"''.2)"G) (G)o o|
00001de0  6e 22 27 27 8a 32 29 22  53 29 20 28 53 29 74 61  |n"''.2)"S) (S)ta|
00001df0  72 74 20 61 20 6e 65 77  20 66 69 6c 65 22 27 27  |rt a new file"''|
00001e00  8a 32 29 22 43 68 6f 6f  73 65 20 41 2c 43 2c 44  |.2)"Choose A,C,D|
00001e10  2c 47 20 6f 72 20 53 22  0d 0f f0 05 f5 0d 0f fa  |,G or S"........|
00001e20  0b 2a 46 58 32 31 2c 30  0d 10 04 10 4b 45 59 25  |.*FX21,0....KEY%|
00001e30  3d a5 20 80 20 26 44 46  0d 10 0e 35 fd 20 4b 45  |=. . &DF...5. KE|
00001e40  59 25 3d 36 35 20 84 20  4b 45 59 25 3d 36 37 20  |Y%=65 . KEY%=67 |
00001e50  84 20 4b 45 59 25 3d 36  38 20 84 20 4b 45 59 25  |. KEY%=68 . KEY%|
00001e60  3d 37 31 20 84 20 4b 45  59 25 3d 38 33 0d 10 18  |=71 . KEY%=83...|
00001e70  12 e7 20 4b 45 59 25 3d  36 37 20 8c 20 2a 2e 0d  |.. KEY%=67 . *..|
00001e80  10 22 a7 e7 20 4b 45 59  25 3d 36 38 20 f1 27 8a  |.".. KEY%=68 .'.|
00001e90  31 30 29 22 45 6e 74 65  72 20 64 72 69 76 65 20  |10)"Enter drive |
00001ea0  6e 6f 2e 22 3b 3a f5 3a  4b 45 59 25 3d a5 2d 34  |no.";:.:KEY%=.-4|
00001eb0  38 3a fd 4b 45 59 25 3e  2d 31 20 80 20 4b 45 59  |8:.KEY%>-1 . KEY|
00001ec0  25 3c 34 3a f1 3b 22 20  22 3b 4b 45 59 25 3a 24  |%<4:.;" ";KEY%:$|
00001ed0  6c 69 6e 65 3d 22 44 52  2e 22 2b c3 28 4b 45 59  |line="DR."+.(KEY|
00001ee0  25 29 3a 58 25 3d 6c 69  6e 65 20 83 20 32 35 36  |%):X%=line . 256|
00001ef0  3a 59 25 3d 6c 69 6e 65  20 81 20 32 35 36 3a d6  |:Y%=line . 256:.|
00001f00  26 46 46 46 37 3a f1 27  27 8a 31 30 29 22 44 72  |&FFF7:.''.10)"Dr|
00001f10  69 76 65 20 22 3b 4b 45  59 25 3b 22 20 73 65 6c  |ive ";KEY%;" sel|
00001f20  65 63 74 65 64 22 0d 10  2c 28 e7 20 4b 45 59 25  |ected"..,(. KEY%|
00001f30  3d 36 35 20 84 20 4b 45  59 25 3d 37 31 20 84 20  |=65 . KEY%=71 . |
00001f40  4b 45 59 25 3d 38 33 20  e5 20 8d 44 40 50 0d 10  |KEY%=83 . .D@P..|
00001f50  36 08 f2 6b 65 79 0d 10  40 05 db 0d 10 4a 20 fd  |6..key..@....J .|
00001f60  4b 45 59 25 3d 36 35 20  84 20 4b 45 59 25 3d 37  |KEY%=65 . KEY%=7|
00001f70  31 20 84 20 4b 45 59 25  3d 38 33 0d 10 54 07 d9  |1 . KEY%=83..T..|
00001f80  23 30 0d 10 5e 1c 42 25  3d ad 28 c3 28 79 65 61  |#0..^.B%=.(.(yea|
00001f90  72 25 28 56 25 29 2a 31  30 2b 56 25 29 29 0d 10  |r%(V%)*10+V%))..|
00001fa0  68 07 d9 23 30 0d 10 72  1e fd 42 25 3c 3e 30 20  |h..#0..r..B%<>0 |
00001fb0  84 20 4b 45 59 25 3d 36  35 20 84 20 4b 45 59 25  |. KEY%=65 . KEY%|
00001fc0  3d 38 33 0d 10 7c 09 ee  20 85 20 87 0d 10 86 1c  |=83..|.. . .....|
00001fd0  e7 20 4b 45 59 25 3d 36  35 20 f2 63 68 61 69 6e  |. KEY%=65 .chain|
00001fe0  28 22 4d 41 49 4e 22 29  0d 10 90 15 e7 20 4b 45  |("MAIN")..... KE|
00001ff0  59 25 3d 38 33 20 f2 6f  70 65 6e 3a e1 0d 10 9a  |Y%=83 .open:....|
00002000  05 e1 0d 10 a4 05 3a 0d  10 ae 0a dd f2 6f 70 65  |......:......ope|
00002010  6e 0d 10 b8 27 e7 20 56  25 3d 30 20 66 24 3d 22  |n...'. V%=0 f$="|
00002020  49 6e 64 65 78 22 20 8b  20 66 24 3d 70 24 2b 22  |Index" . f$=p$+"|
00002030  20 22 2b c3 28 56 25 29  0d 10 c2 1e f1 8a 30 2c  | "+.(V%)......0,|
00002040  33 29 66 24 3b 22 20 66  6f 72 20 22 3b 79 65 61  |3)f$;" for ";yea|
00002050  72 25 28 56 25 29 0d 10  cc 6b f1 8a 30 2c 35 29  |r%(V%)...k..0,5)|
00002060  22 41 20 6e 65 77 20 66  69 6c 65 20 77 69 6c 6c  |"A new file will|
00002070  20 62 65 20 6f 70 65 6e  65 64 20 69 66 20 74 68  | be opened if th|
00002080  65 72 65 20 69 73 22 27  22 65 6e 6f 75 67 68 20  |ere is"'"enough |
00002090  73 70 61 63 65 2e 22 27  27 22 44 6f 20 79 6f 75  |space."''"Do you|
000020a0  20 77 69 73 68 20 74 6f  20 73 74 61 72 74 20 61  | wish to start a|
000020b0  20 6e 65 77 20 66 69 6c  65 3f 20 28 59 2f 4e 29  | new file? (Y/N)|
000020c0  22 0d 10 d6 05 f5 0d 10  e0 0b 2a 46 58 32 31 2c  |".........*FX21,|
000020d0  30 0d 10 ea 0e 41 25 3d  a5 20 80 20 26 44 46 0d  |0....A%=. . &DF.|
000020e0  10 f4 13 fd 20 41 25 3d  37 38 20 84 20 41 25 3d  |.... A%=78 . A%=|
000020f0  38 39 0d 10 fe 0d e7 20  41 25 3d 37 38 20 e1 0d  |89..... A%=78 ..|
00002100  11 08 05 f5 0d 11 12 05  f5 0d 11 1c a2 f1 27 22  |..............'"|
00002110  45 6e 74 65 72 20 64 61  74 65 20 66 72 6f 6d 20  |Enter date from |
00002120  77 68 69 63 68 20 22 3b  66 24 27 22 69 73 20 74  |which ";f$'"is t|
00002130  6f 20 73 74 61 72 74 20  69 6e 20 74 68 65 20 66  |o start in the f|
00002140  6f 72 6d 20 44 44 2f 4d  4d 22 27 22 77 68 65 72  |orm DD/MM"'"wher|
00002150  65 20 44 44 20 69 73 20  74 68 65 20 64 61 79 20  |e DD is the day |
00002160  6f 66 20 74 68 65 20 6d  6f 6e 74 68 22 27 22 61  |of the month"'"a|
00002170  6e 64 20 4d 4d 20 69 73  20 74 68 65 20 6d 6f 6e  |nd MM is the mon|
00002180  74 68 20 6f 66 20 74 68  65 20 79 65 61 72 22 3b  |th of the year";|
00002190  3a e8 61 24 3a 61 24 3d  61 24 2b 22 2f 22 2b c3  |:.a$:a$=a$+"/"+.|
000021a0  28 79 65 61 72 25 28 56  25 29 29 0d 11 26 25 e7  |(year%(V%))..&%.|
000021b0  20 c1 61 24 2c 33 2c 31  29 3c 3e 22 2f 22 20 f2  | .a$,3,1)<>"/" .|
000021c0  65 72 72 6f 72 64 61 74  65 3a e5 20 8d 54 5c 51  |errordate:. .T\Q|
000021d0  0d 11 30 0d e3 20 49 25  3d 31 b8 31 30 0d 11 3a  |..0.. I%=1.10..:|
000021e0  18 e7 20 49 25 3d 33 20  84 20 49 25 3d 36 20 e5  |.. I%=3 . I%=6 .|
000021f0  20 8d 44 4e 51 0d 11 44  34 e7 20 c1 61 24 2c 49  | .DNQ..D4. .a$,I|
00002200  25 2c 31 29 3c 22 30 22  20 84 20 c1 61 24 2c 49  |%,1)<"0" . .a$,I|
00002210  25 2c 31 29 3e 22 39 22  20 f2 65 72 72 6f 72 64  |%,1)>"9" .errord|
00002220  61 74 65 3a 49 25 3d 32  30 0d 11 4e 05 ed 0d 11  |ate:I%=20..N....|
00002230  58 0b fd 20 49 25 3c 31  39 0d 11 62 11 44 3d bb  |X.. I%<19..b.D=.|
00002240  28 c1 61 24 2c 31 2c 32  29 29 0d 11 6c 11 4d 3d  |(.a$,1,2))..l.M=|
00002250  bb 28 c1 61 24 2c 34 2c  32 29 29 0d 11 76 11 59  |.(.a$,4,2))..v.Y|
00002260  3d bb 28 c1 61 24 2c 37  2c 34 29 29 0d 11 80 23  |=.(.a$,7,4))...#|
00002270  e7 20 a4 76 61 6c 69 64  61 74 65 28 44 2c 4d 2c  |. .validate(D,M,|
00002280  59 29 3d 30 20 f2 65 72  72 6f 72 64 61 74 65 0d  |Y)=0 .errordate.|
00002290  11 8a 19 fd 20 a4 76 61  6c 69 64 61 74 65 28 44  |.... .validate(D|
000022a0  2c 4d 2c 59 29 3c 3e 30  0d 11 94 2c e8 27 22 41  |,M,Y)<>0...,.'"A|
000022b0  6e 64 20 65 6e 74 65 72  20 64 61 79 20 6f 66 20  |nd enter day of |
000022c0  77 65 65 6b 20 28 4d 6f  6e 64 61 79 3d 31 29 20  |week (Monday=1) |
000022d0  22 44 41 59 0d 11 9e 7b  e7 20 44 41 59 3e 35 20  |"DAY...{. DAY>5 |
000022e0  f1 27 22 57 65 65 6b 65  6e 64 73 20 61 72 65 20  |.'"Weekends are |
000022f0  6e 6f 74 20 61 6c 6c 6f  77 65 64 20 21 22 27 22  |not allowed !"'"|
00002300  54 68 65 20 6e 65 78 74  20 4d 6f 6e 64 61 79 20  |The next Monday |
00002310  77 69 6c 6c 20 62 65 20  75 73 65 64 20 61 6e 64  |will be used and|
00002320  22 27 22 74 68 65 20 64  61 74 65 20 77 69 6c 6c  |"'"the date will|
00002330  20 62 65 20 61 64 6a 75  73 74 65 64 2e 22 3a 43  | be adjusted.":C|
00002340  25 3d 31 3a f2 61 64 6a  75 73 74 64 61 74 65 0d  |%=1:.adjustdate.|
00002350  11 a8 05 db 0d 11 b2 26  f1 8a 32 2c 35 29 22 49  |.......&..2,5)"I|
00002360  4e 49 54 49 41 4c 49 53  49 4e 47 20 2d 20 50 6c  |NITIALISING - Pl|
00002370  65 61 73 65 20 77 61 69  74 22 0d 11 bc 1e 42 25  |ease wait"....B%|
00002380  3d ad 28 c3 28 79 65 61  72 25 28 56 25 29 2d 31  |=.(.(year%(V%)-1|
00002390  29 2b c3 28 56 25 29 29  0d 11 c6 11 e7 20 42 25  |)+.(V%))..... B%|
000023a0  3d 30 20 e5 20 8d 54 6a  52 0d 11 d0 2c f4 20 54  |=0 . .TjR...,. T|
000023b0  61 6b 65 20 61 20 63 6f  70 79 20 6f 66 20 73 68  |ake a copy of sh|
000023c0  61 72 65 6e 61 6d 65 73  20 66 6f 72 20 6e 65 77  |arenames for new|
000023d0  20 66 69 6c 65 0d 11 da  10 e3 49 25 3d 31 b8 6e  | file.....I%=1.n|
000023e0  64 61 74 61 25 0d 11 e4  0d 73 24 28 49 25 29 3d  |data%....s$(I%)=|
000023f0  22 22 0d 11 ee 0b e3 4a  25 3d 31 b8 37 0d 11 f8  |"".....J%=1.7...|
00002400  19 73 24 28 49 25 29 3d  73 24 28 49 25 29 2b bd  |.s$(I%)=s$(I%)+.|
00002410  28 9a 23 42 25 29 0d 12  02 05 ed 0d 12 0c 05 ed  |(.#B%)..........|
00002420  0d 12 16 07 d9 23 30 0d  12 20 35 f4 20 53 65 6e  |.....#0.. 5. Sen|
00002430  64 20 64 61 74 61 20 74  6f 20 64 69 73 63 20 61  |d data to disc a|
00002440  73 20 6f 75 74 6c 69 6e  65 64 20 61 74 20 73 74  |s outlined at st|
00002450  61 72 74 20 6f 66 20 70  72 6f 67 2e 0d 12 2a 0b  |art of prog...*.|
00002460  f2 65 73 70 61 63 65 0d  12 34 0a f2 6f 70 65 6e  |.espace..4..open|
00002470  32 0d 12 3e 0d f2 70 75  73 68 79 65 61 72 0d 12  |2..>..pushyear..|
00002480  48 09 ee 20 85 20 87 0d  12 52 05 e1 0d 12 5c 05  |H.. . ...R....\.|
00002490  3a 0d 12 66 0b dd f2 6f  70 65 6e 32 0d 12 70 33  |:..f...open2..p3|
000024a0  24 6c 69 6e 65 3d 22 53  41 56 45 20 22 2b c3 28  |$line="SAVE "+.(|
000024b0  79 65 61 72 25 28 56 25  29 29 2b c3 28 56 25 29  |year%(V%))+.(V%)|
000024c0  2b 22 20 32 30 30 30 20  2b 22 2b c3 7e 44 25 0d  |+" 2000 +"+.~D%.|
000024d0  12 7a 0a d6 26 46 46 46  37 0d 12 84 1c 41 25 3d  |.z..&FFF7....A%=|
000024e0  ae 28 c3 28 79 65 61 72  25 28 56 25 29 29 2b c3  |.(.(year%(V%))+.|
000024f0  28 56 25 29 29 0d 12 8e  10 e3 49 25 3d 31 b8 6e  |(V%)).....I%=1.n|
00002500  64 61 74 61 25 0d 12 98  0b e3 4a 25 3d 31 b8 37  |data%.....J%=1.7|
00002510  0d 12 a2 19 d5 23 41 25  2c 97 28 c1 73 24 28 49  |.....#A%,.(.s$(I|
00002520  25 29 2c 4a 25 2c 31 29  29 0d 12 ac 05 ed 0d 12  |%),J%,1)).......|
00002530  b6 05 ed 0d 12 c0 12 cf  23 41 25 3d 66 69 72 73  |........#A%=firs|
00002540  74 70 74 72 25 0d 12 ca  19 d5 23 41 25 2c 6d 69  |tptr%.....#A%,mi|
00002550  6e 72 65 63 6f 72 64 25  20 81 20 32 35 36 0d 12  |nrecord% . 256..|
00002560  d4 19 d5 23 41 25 2c 6d  69 6e 72 65 63 6f 72 64  |...#A%,minrecord|
00002570  25 20 83 20 32 35 36 0d  12 de 0a d5 23 41 25 2c  |% . 256.....#A%,|
00002580  44 0d 12 e8 0a d5 23 41  25 2c 4d 0d 12 f2 12 d5  |D.....#A%,M.....|
00002590  23 41 25 2c 28 59 20 81  20 32 35 36 29 0d 12 fc  |#A%,(Y . 256)...|
000025a0  12 d5 23 41 25 2c 28 59  20 83 20 32 35 36 29 0d  |..#A%,(Y . 256).|
000025b0  13 06 0c d5 23 41 25 2c  44 41 59 0d 13 10 19 d5  |....#A%,DAY.....|
000025c0  23 41 25 2c 6d 69 6e 72  65 63 6f 72 64 25 20 81  |#A%,minrecord% .|
000025d0  20 32 35 36 0d 13 1a 19  d5 23 41 25 2c 6d 69 6e  | 256.....#A%,min|
000025e0  72 65 63 6f 72 64 25 20  83 20 32 35 36 0d 13 24  |record% . 256..$|
000025f0  0a d5 23 41 25 2c 44 0d  13 2e 0a d5 23 41 25 2c  |..#A%,D.....#A%,|
00002600  4d 0d 13 38 12 d5 23 41  25 2c 28 59 20 81 20 32  |M..8..#A%,(Y . 2|
00002610  35 36 29 0d 13 42 12 d5  23 41 25 2c 28 59 20 83  |56)..B..#A%,(Y .|
00002620  20 32 35 36 29 0d 13 4c  11 e3 20 49 25 3d 31 b8  | 256)..L.. I%=1.|
00002630  6e 64 61 74 61 25 0d 13  56 0c d5 23 41 25 2c 26  |ndata%..V..#A%,&|
00002640  46 46 0d 13 60 0c d5 23  41 25 2c 26 46 46 0d 13  |FF..`..#A%,&FF..|
00002650  6a 0a d5 23 41 25 2c 30  0d 13 74 0a d5 23 41 25  |j..#A%,0..t..#A%|
00002660  2c 30 0d 13 7e 05 ed 0d  13 88 13 cf 23 41 25 3d  |,0..~.......#A%=|
00002670  6d 69 6e 72 65 63 6f 72  64 25 0d 13 92 08 43 25  |minrecord%....C%|
00002680  3d 31 0d 13 9c 0a 47 25  3d bc 2b 31 0d 13 a6 0a  |=1....G%=.+1....|
00002690  4f 4c 44 59 3d 59 0d 13  b0 08 43 25 3d 31 0d 13  |OLDY=Y....C%=1..|
000026a0  ba 05 f5 0d 13 c4 0f f2  61 64 6a 75 73 74 64 61  |........adjustda|
000026b0  74 65 0d 13 ce 14 e7 20  59 3c 3e 4f 4c 44 59 20  |te..... Y<>OLDY |
000026c0  e5 20 8d 54 40 54 0d 13  d8 13 e3 20 49 25 3d 31  |. .T@T..... I%=1|
000026d0  b8 6e 64 61 74 61 25 2a  32 0d 13 e2 0a d5 23 41  |.ndata%*2.....#A|
000026e0  25 2c 30 0d 13 ec 05 ed  0d 13 f6 1c f1 8a 35 2c  |%,0...........5,|
000026f0  47 25 29 44 3b 22 2f 22  3b 4d 3b 22 2f 22 3b 59  |G%)D;"/";M;"/";Y|
00002700  3b 22 20 22 0d 14 00 0d  fd 20 59 3c 3e 4f 4c 44  |;" "..... Y<>OLD|
00002710  59 0d 14 0a 13 e3 20 49  25 3d 31 b8 6e 64 61 74  |Y..... I%=1.ndat|
00002720  61 25 2a 32 0d 14 14 0a  d5 23 41 25 2c 30 0d 14  |a%*2.....#A%,0..|
00002730  1e 05 ed 0d 14 28 07 d9  23 30 0d 14 32 0d f2 74  |.....(..#0..2..t|
00002740  68 6f 6c 64 28 31 29 0d  14 3c 46 f4 20 53 65 74  |hold(1)..<F. Set|
00002750  20 63 75 72 72 65 6e 74  20 64 69 73 63 20 70 6f  | current disc po|
00002760  69 6e 74 65 72 20 74 6f  20 70 6f 69 6e 74 20 61  |inter to point a|
00002770  74 20 63 75 72 72 65 6e  74 20 64 61 74 61 20 70  |t current data p|
00002780  6f 69 6e 74 20 69 65 20  66 69 72 73 74 0d 14 46  |oint ie first..F|
00002790  17 64 69 73 63 70 74 72  25 3d 6d 69 6e 72 65 63  |.discptr%=minrec|
000027a0  6f 72 64 25 0d 14 50 07  d9 23 30 0d 14 5a 05 db  |ord%..P..#0..Z..|
000027b0  0d 14 64 09 ee 20 85 20  87 0d 14 6e 05 e1 0d 14  |..d.. . ...n....|
000027c0  78 05 3a 0d 14 82 0f dd  f2 74 68 6f 6c 64 28 42  |x.:......thold(B|
000027d0  25 29 0d 14 8c 2e e7 20  42 25 3d 30 3a 74 65 6d  |%)..... B%=0:tem|
000027e0  70 64 61 79 3d 44 41 59  3a 74 65 6d 70 64 3d 44  |pday=DAY:tempd=D|
000027f0  3a 74 65 6d 70 6d 3d 4d  3a 74 65 6d 70 79 3d 59  |:tempm=M:tempy=Y|
00002800  0d 14 96 2e e7 20 42 25  3d 31 20 44 41 59 3d 74  |..... B%=1 DAY=t|
00002810  65 6d 70 64 61 79 3a 44  3d 74 65 6d 70 64 3a 4d  |empday:D=tempd:M|
00002820  3d 74 65 6d 70 6d 3a 59  3d 74 65 6d 70 79 0d 14  |=tempm:Y=tempy..|
00002830  a0 05 e1 0d 14 aa 05 3a  0d 14 b4 0c dd f2 65 73  |.......:......es|
00002840  70 61 63 65 0d 14 be 0d  f2 74 68 6f 6c 64 28 30  |pace.....thold(0|
00002850  29 0d 14 c8 08 43 25 3d  31 0d 14 d2 08 44 25 3d  |)....C%=1....D%=|
00002860  30 0d 14 dc 0a 4f 4c 44  59 3d 59 0d 14 e6 05 f5  |0....OLDY=Y.....|
00002870  0d 14 f0 0f f2 61 64 6a  75 73 74 64 61 74 65 0d  |.....adjustdate.|
00002880  14 fa 0b 44 25 3d 44 25  2b 31 0d 15 04 0c fd 59  |...D%=D%+1.....Y|
00002890  3c 3e 4f 4c 44 59 0d 15  0e 0d f2 74 68 6f 6c 64  |<>OLDY.....thold|
000028a0  28 31 29 0d 15 18 16 44  25 3d 28 44 25 2d 31 29  |(1)....D%=(D%-1)|
000028b0  2a 6e 64 61 74 61 25 2a  32 0d 15 22 11 58 25 3d  |*ndata%*2..".X%=|
000028c0  6c 69 6e 65 20 83 20 32  35 36 0d 15 2c 11 59 25  |line . 256..,.Y%|
000028d0  3d 6c 69 6e 65 20 81 20  32 35 36 0d 15 36 09 ee  |=line . 256..6..|
000028e0  20 85 20 87 0d 15 40 05  e1 0d 15 4a 05 3a 0d 15  | . ...@....J.:..|
000028f0  54 0f dd f2 65 72 72 6f  72 64 61 74 65 0d 15 5e  |T...errordate..^|
00002900  05 db 0d 15 68 36 f1 8a  35 2c 31 30 29 22 45 72  |....h6..5,10)"Er|
00002910  72 6f 72 20 69 6e 20 64  61 74 65 2e 22 27 27 22  |ror in date."''"|
00002920  50 72 65 73 73 20 61 20  4b 45 59 20 74 6f 20 72  |Press a KEY to r|
00002930  65 2d 65 6e 74 65 72 22  0d 15 72 08 49 25 3d a5  |e-enter"..r.I%=.|
00002940  0d 15 7c 05 db 0d 15 86  05 e1 0d 15 90 05 3a 0d  |..|...........:.|
00002950  15 9a 0e dd f2 70 75 73  68 79 65 61 72 0d 15 a4  |.....pushyear...|
00002960  0b f2 73 79 73 74 65 6d  0d 15 ae 13 58 25 3d ae  |..system....X%=.|
00002970  28 22 3a 30 2e 59 45 41  52 22 29 0d 15 b8 0c e3  |(":0.YEAR").....|
00002980  20 49 25 3d 30 b8 33 0d  15 c2 12 f1 23 58 25 2c  | I%=0.3.....#X%,|
00002990  79 65 61 72 25 28 49 25  29 0d 15 cc 05 ed 0d 15  |year%(I%).......|
000029a0  d6 05 e1 0d 15 e0 05 3a  0d 15 ea 0c dd f2 73 79  |.......:......sy|
000029b0  73 74 65 6d 0d 15 f4 05  f5 0d 15 fe 0b 2a 46 58  |stem.........*FX|
000029c0  32 31 2c 30 0d 16 08 13  41 25 3d ad 28 22 3a 30  |21,0....A%=.(":0|
000029d0  2e 4d 41 49 4e 22 29 0d  16 12 07 d9 23 30 0d 16  |.MAIN").....#0..|
000029e0  1c 58 e7 20 41 25 3d 30  20 db 3a f1 8a 30 2c 31  |.X. A%=0 .:..0,1|
000029f0  30 29 22 49 6e 73 65 72  74 20 53 79 73 74 65 6d  |0)"Insert System|
00002a00  20 44 69 73 63 20 69 6e  20 64 72 69 76 65 20 30  | Disc in drive 0|
00002a10  22 27 27 22 61 6e 64 20  70 72 65 73 73 20 61 6e  |"''"and press an|
00002a20  79 20 6b 65 79 20 74 6f  20 63 6f 6e 74 69 6e 75  |y key to continu|
00002a30  65 22 3a f5 fd a5 0d 16  26 0b fd 20 41 25 3c 3e  |e":.....&.. A%<>|
00002a40  30 0d 16 30 05 e1 0d 16  3a 05 3a 0d 16 44 0e dd  |0..0....:.:..D..|
00002a50  f2 61 73 73 65 6d 62 6c  65 0d 16 4e 07 ef 32 31  |.assemble..N..21|
00002a60  0d 16 58 0f e3 20 4e 25  3d 30 b8 32 20 88 32 0d  |..X.. N%=0.2 .2.|
00002a70  16 62 0a 50 25 3d 6d 63  25 0d 16 6c 05 5b 0d 16  |.b.P%=mc%..l.[..|
00002a80  76 0a 4f 50 54 20 4e 25  0d 16 80 0a 2e 73 74 61  |v.OPT N%.....sta|
00002a90  72 74 0d 16 8a 3d 20 20  20 20 6c 64 61 20 23 62  |rt...=    lda #b|
00002aa0  6c 6f 63 6b 33 25 20 83  20 32 35 36 3a 73 74 61  |lock3% . 256:sta|
00002ab0  20 26 38 30 3a 6c 64 61  20 23 62 6c 6f 63 6b 33  | &80:lda #block3|
00002ac0  25 20 81 20 32 35 36 3a  73 74 61 20 26 38 31 0d  |% . 256:sta &81.|
00002ad0  16 94 09 2e 6c 6f 6f 70  0d 16 9e 0e 20 20 20 20  |....loop....    |
00002ae0  6c 64 79 20 23 32 0d 16  a8 0a 2e 6c 6f 6f 70 31  |ldy #2.....loop1|
00002af0  0d 16 b2 28 20 20 20 20  6c 64 61 20 28 26 38 30  |...(    lda (&80|
00002b00  29 2c 59 3a 61 6e 64 20  23 26 37 46 3a 73 74 61  |),Y:and #&7F:sta|
00002b10  20 28 26 38 30 29 2c 59  0d 16 bc 08 2e 6f 6b 31  | (&80),Y.....ok1|
00002b20  0d 16 c6 2b 20 20 20 20  63 6d 70 20 23 33 32 3a  |...+    cmp #32:|
00002b30  62 63 73 20 6f 6b 32 3a  6c 64 61 20 23 33 32 3a  |bcs ok2:lda #32:|
00002b40  73 74 61 20 28 26 38 30  29 2c 59 0d 16 d0 08 2e  |sta (&80),Y.....|
00002b50  6f 6b 32 0d 16 da 9d 20  20 20 20 69 6e 79 3a 63  |ok2....    iny:c|
00002b60  70 79 20 23 34 32 3a 62  63 63 20 6c 6f 6f 70 31  |py #42:bcc loop1|
00002b70  3a 63 6c 63 3a 6c 64 61  20 23 34 32 3a 61 64 63  |:clc:lda #42:adc|
00002b80  20 26 38 30 3a 73 74 61  20 26 38 30 3a 6c 64 61  | &80:sta &80:lda|
00002b90  20 23 30 3a 61 64 63 20  26 38 31 3a 73 74 61 20  | #0:adc &81:sta |
00002ba0  26 38 31 3a 63 6d 70 20  23 28 62 6c 6f 63 6b 33  |&81:cmp #(block3|
00002bb0  25 2b 26 38 30 30 29 20  81 20 32 35 36 3a 62 63  |%+&800) . 256:bc|
00002bc0  63 20 6c 6f 6f 70 3a 6c  64 61 20 26 38 30 3a 63  |c loop:lda &80:c|
00002bd0  6d 70 20 23 28 62 6c 6f  63 6b 33 25 20 83 20 32  |mp #(block3% . 2|
00002be0  35 36 29 3a 62 63 63 20  6c 6f 6f 70 3a 72 74 73  |56):bcc loop:rts|
00002bf0  0d 16 e4 05 5d 0d 16 ee  05 ed 0d 16 f8 06 ef 36  |....]..........6|
00002c00  0d 17 02 05 e1 0d ff                              |.......|
00002c07
27-11-88/AUTO.m0
27-11-88/AUTO.m1
27-11-88/AUTO.m2
27-11-88/AUTO.m4
27-11-88/AUTO.m5