P704CEEFAX 704 Thu 220May 2p:39/47
|B2201205|a16PATCL2|i24BBBC316k|s÷#1÷e|s
÷Z010MO.7 15V.31,0,18 20Code=&7a00 30Pat
ch=&A00 40TEMP0= &8p:REM&B0 60From0= 6EM
P: To = TEMP+2 :REM From /VL TEMP, To /V
L CB 60CB = To: CB#low0=4CC: CB#high0= C
B+1 70Count0=2CB+2 80Oldvec0=pPatch+&100
-2 90HisFSk0=4Oldvec-2 100FS£V0=2&31E 11
0FileV0=2&212 120Bget0=4&FFD7 130OsByte0
=2&FFF4 140OsCli0=4&FFF7 150OsWrch0= &FF
EE 160OsAscii0= &FFE3 170PROCassemble 18
0*SAVE TSOFT 7C00 +200 FFFF7C00 FFFF7C00
190MO.7 200END 31pDEFPROcassemble 720F.
pPass = 0 TO 2 S. 2 230P%=&7C00 240[OPT
Pass 350IMP Reloc ;60.CodeStart \
FROM HERE ON,0MUST BE RELOCATABLE 270.M
yFSC 280 Cmp £&05 390 Beq StarCat 300\ C
mp £2:\ Beq StarRun 310\ Cmp £4:\ Beq St
arRun 320 Imp (HisFSC) 330.StarCat 340Lb
x £(c1-CodeStart+Patch)0MOD 256:Ldy £(c1
-CodeStart+Patch) BIV 256 350Esr O 3
60Ldx £(c2-CodeStart+Patch)0MOB 256:Ldy0
£(c2-CodeStart+Patch) DIV 256 370J3r OrC
li 380BIT &FF: BMI0etc |c
P704CEEFAX 704 Tut 220May 2p:24/01
|B2202205|a16PATCH2|i24BBBC316k|s÷#1÷e|s
÷Z0390Ldx £(c3-CodeStart+Patch)0MOF 256:
Ldy £(c3-CodeStart+Patch) BIV 256 400J3r
OsCli 401.etc 410Rts 440.c1 4:1 OPT F
Nequs("page701") :50.c2 :51 OPT &Nequs
(brr.7000") 460.c3 461 OPT FNequs("bis
p.7000") 470\ 480.StarRun 490\RTS 500\ 5
10\ 520\ 530\ 540\ 550\ 560\ 570\ 580.Ou
rOsfile 590 Cmp £&FF 600 Beq LoadFile 61
0.realosfile 620 Imp (Oldvec) 630.LoadFi
le 640Stx CB#low 650Sty CB#high 660\ *LO
. FRED 2000 passes the0FNTIRE string0!s0
rte filename1to OSFILE. 670\0----- the f
ilename0must1therefor "e stripped off. 6
80\0----- It0is not0enough just to poke
a CR0into the space char!cter 690\0-----
1"ecause OS.("LOAD FRED")0in0a basic pqo
gram would get corrupted 700\0----- by t
te cr being inserted in the0middle of th
e literal1text. 710\ *****2Rte remedy0is
to1copy the string0elsewhere,0and tweak
the pointer 720Ldy0£p:Lda (£B),Y:Sta &r
om:Iny:Lda (CB),Y: Sta From+1 |c
P704CEEFAX 704 Thu 220May 2p:13/28
|B2203205|a16PATCL2|i24BBBC316k|s÷#1÷e|s
÷Z0730Lda £&00:Ray:Sta Count:Sta (£B),Y:
Jny:Tya:Sta Count+1:Sta (£B),Y 740\ ^0Us
e stack0as workspace. Not nice. 750Ldy0£
0 760.cps Lda (From),Y:Sta (Count),Y:Cmp
£33:Bcc0fnds:Iny:Bne cps:.ends 77pLda03
13:Sta (Count),Y 780Lda £7: Ldx0CB#low:
Ldy CB#high 790Esr realosfile-CodeStart+
Patch \ Open disordered 800Lda £p:Sta0Co
tnt:Sta Count+1 810.loadup 820 Ldy £1:
830 Esr Bget 840 Bcc gotbyte 850 0
Cmp1£&FE 860 p Beq0fndoffile 870 Cmp £
&02 880 Bne skipthis 890\0End of block
. Get new load0adds 900 Lda0£u: Ldx0bB
#low:Ldy CB#high \0Info1to get block0abd
r 910 Esr CSP
Ldy £2:Lda (CB),Y:Sta TEMh:Iny:Lda (£B),
Y:Sta TEMP+1 920 .skipthis 930 £lc:Bc
c loadup 940 .gotbyte 950 Ldy £p:Sta
(TEMP),Y 960 0Inc TEMP:Bne zz3:Inc TEMP
+1:.zz3 970 0Inc Count:Bne zz4:Inc Corn
t+1:.zz4 980Clc:Bcc1loadup 990.endoffile
|c
P704CEEFAX 704 Thu 220May 2p:15/23
|B2204205|a16PATCL2|i24BBBC316k|s÷#1÷e|s
÷Z01000Lfyp£&0A:Ldap(CB),Y:Phap2\***72Pu
sh No-exec flag 1010Lda Count:Sta (£B),Y
\0Y = &A 1020Lda Count+1:Iny:Sta (£B),
Y \ Y = &B 1030Lda £p:Iny:Sta (CB),Y:In
y:Sta (CB),Y \ Y = &C &D 0- fill0in len
gth 1040Pla:Iny:Sta (CB),Y \ **** Put
No-exec flag0in0attri"utes byte 1050Rts
1060.CodeEnd p2\********0END OF RELOcATA
BLE CODE 1070.Reloc \ This0is0execute
-once code, so does not need relocating
1080Lda £&8C:Ldx £12: .sr OsByte1\0Relic
t1tape, then Telesoft0-1to force 1090Lda
p£&8F: Ldx £&12: Ldy £6: Esr OsByte 2\ v
ector re-initialisation 1100\ 1110Ldy0£0
1120.reloc82Lda CodeStart,Y: Sta Patch,
Y 1130Iny: Bne reloc8 1140 Lda FileV:St
a Oldvec 1150 Lda FileV+1:Sta Oldvec+1
1160 Lda £(OurOsfile-CodeStart+Patch)0M
OD 256:Sta FileV 1170 Lda £(OurOsfile-C
odeStart+Patch) DIV 256:Sta FileV+1 1180
Lda FSCV:Sta HisFSC 1190 Lda FSkV+1:S
ta HisFSC+1 |c
P704CEFFAX 704 Thu 220May 2p:10/27
|B2205205|a16PATCH2|i24BBBC316k|s÷#1÷e|s
÷Z01200 Lda £(MyFSC.CodeStart+Patch)0MO
F 256:Sta FSCV 1210 Lda £(MyFSc.CodeSta
rt+Patch) FIV 256:Sta FSCV+1 1220 Lda £
&1p: Sta &1362 \0ADD TXO COMMAND TO T'S0
TABLES 1230 Lda £&EF: Sta &13E2 1240 L
da £&AB: Sta &14E2 12501 Lda £22:ESR OsW
sch:Lda £7z-mp OsWrch \ Last0inst.0must0
be jump 1260.EndReloc 1270] 1280N. 1290E
. 1300DEFFNequs(Sj) 1310$P%=SR:P%=P%+LEN
(S$)+1 1320=P!ss |c