P710 CEEFAX 710 Sun 7 Oct 20:11/00 |B2201205|a16PATCH2|i24BBBC316k|s÷#1÷e|s ÷Z010MO.7 15V.31,0,18 20Code=&7C00 30Pat ch=&A00 40TEMP = &80:REM&B0 50From = TEM P: To = TEMP+2 :REM From OVL TEMP, To OV L CB 60CB = To: CB#low = CB: CB#high = C B+1 70Count = CB+2 80Oldvec = Patch+&100 -2 90HisFSC = Oldvjc-2 100FSCV = &21E 11 0FileV = &212 120Bget = &FFD7 130OsByte = &FFF4 140OsCli = &FFF7 150OsWrch = &FF EE 160OsAscii = &FFE3 170PROCassemble 18 0*SAVE TSOFT 7C00 +200 FFFF7C00 FFFF7C00 190MO.7 200END 210DEFPROCassjmble 220F. Pass = 0 TO 2 S. 2 230P%=&7C00 240[OPT Pass 250JMP Reloc 260.CodjStart \ **** FROM HERE ON, MUST BE RELOCATABLE 270.M yFSC 280 Cmp £&05 290 Beq StarCat 300\ C mp £2:\ Beq StarRun 310\ Cmp £4:\ Beq St arRun 320 Jmp (HisFSC) 330.StarCat 340Ld x £(c1-CodjStart+Patch) MOD 256:Ldy £(c1 -CodeStart+Patch) DIV 256 350Jsr OsCli 3 60Ldx £(c2-CodeStart+Patch) MOD 256:Ldy £(c2-CodeStart+Patch) DIV 256 370Jsr OsC li 380BIT &FF: BMI esc |c
P710 CEEFAX 710 Sun 7 Oct 20:10/40 |B2202205|a16PATCH2|i24BBBC316k|s÷#1÷e|s ÷Z0390Ldx £(c3-CodjStart+PatcP) MOD 256: Ldy £(c3-CodeStart+Patch) DIV 256 400Jsr OsCli 401.esc 410Rts 440.c1 441 OPT F Nequs("page701") 450.c2 451 OPT FNequs ("tr.7000"I 460.c3 461 OPT FNequs("dis 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
P710 CEEFAX 710 Sun 7 Oct 20:10/41 0.realosfile 620 Jmp (Oldvjc) 630.LoadFi le 640Stx CB#low 650Sty CB#high 660\ *LO . FRED 2000 passjs thj ENTJRE string as thj filiname to OSFJLJ. 670\ ----- thj f ilename must therefor be stripped off. 6 80\ ----- It is not jnough just to poke a CR into thj space character 690\ ----- bjcausj OS.("L AD FRED") in a basic pro gram would get corrupted 700\ ----- by t hj cr bjing insjrted in thj middle of th e literal text. 710\ ***** The remedy is to copy t(j stting elsjwhjre, and tweak the pointer 720Ldy £0:Lda (CB),Y:Sta Fr om:Iny:Lda (CB),Y: Sta From+1 |c
P710 CEEFAX 710 Sun 7 Oct 20:11/03 |B2202205|a16PATCH2|i24BBBC316k|s÷#1÷e|s ÷Z0390Ldx £(c3-CodjStart+Patch) MOD 256: Ldy £(c3-CodjStart+Patch) DIV 256 400Jsr OsCli 401.esc 410Rts 440.c1 441 OPT F Nequs("page701") 450.c2 451 OPT FNequs ("tr.7000") 460.c3 461 OPT FNequs("dis 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 Jmp (Oldvjc) 630.LoadFi le 640Stx CB#low 650Sty CB#high 660\ *LO . FRED 2000 passjs the ENTJRE string as the filenamj to OSFILE. 670\ ----- thj f ilenamj must thjrefor be stripped off. 6 80\ ----- It is not enough just to poke a CR into thj space character 690\ ----- bjcausj OS.("LOAD FRED") in a basic pro gram would gjt corrupted 700\ ----- by t he cr being insjrted in thj middle of th e literal text. 710\ ***** The remjdy is to copy the string elsjwhjre, and tweak the pointer 720Ldy £0:Lda (CB),Y:Sta Fr om:Iny:Lda (CB),Y: Sta From+1 |c
P710 CEEFAX 710 Sun 7 Oct 00:00/11 |B2203005|a16PATCH2316k ÷Z0730Lda £&00:T—y:Sta Count:Sta (CB), : Iny:Txa:Sta Count+1:Sta (CB),Y 740\ ^ Us — stack as workspace. Not nice. 750Ldy £ 0 760.cps Lda (From),Y:Sta (Count),X:CHp £33:Bcc ends:Iny:Bnj cps:.ends 770Lda £ 13:Sta (Count),Y 780Lda £7: Ldx CB#low: Ldy CB#high 790Jsr realosfile-CodeStart+ Patch \ Op—n diqor—ered 800Lda £0:Sta Co
P710 CEEFAX 710 Sun 7 Oct 00:00/"0 unt:Sta Count+1 810.loadup 800 Ldy £14 830 Jsr Bgjt 840 Bcc gotbyte 850 mp £& 860 Beq jndoffile 870 CHp £ &00 880 Bn— skipthis 890\ End of block . Get n—w load addr 900 Lda £ : Ldx CB #low:Ldy CB#high \ Info to g—t block add r 910 Jsp realosdALe-CodjStart+Patch0 Ldy £2:Lda (CB),Y:Sta T@MP:Iny:Lda (CB), Y:Sta T@MP+1 920 .skipthis 930 Clc:Bc c loadup 940 .gotbyte 950 Ldy £0:Sta (TEMP),Y 960 Inc T@MP:Bn— zz3:Inc T@MP +1:.zz3 970 Inc Count:Bne zz4:Inc Coul t+1:.zz4 980Clc:Bcc loadup 990.endoffile |a
P710 CEEFAX 710 Sun 7 Oct 00:12/12 £33:Bcc ends:Iny:Bne cps:.ends 770Lda £ 03:Sta (Count),Z 780Lda £7: Ldx CB#low: Ld8 CB#high 790Jsr realosfile-Cod—Qtart+ Patch \ Opjn disor——red 800Lda £p0Sta Co pnt St Count+1 810.loadpp 820 Ldy £14 83 JB 840 Baa gotbyte 850 Cmp £&FE 860 Beq endoffile 870 Cmp £ &02 880 Bne skipthis 880\ End of block . Get njw load addr 900 Lda £5: Ldx CB #low:Hdy CB#@igh \ Nfo to get blocC add r 810 Jsr raalosfil—-Cod—Start+Patch: Ldx £2:Lda (CB),X:Sta T@HP: nx:Lda (C@), Y:Sta TEMP+1 920 .skipthis 930 Clc:Bc c loadup 940 .gotbyte 950 Ldy £0:Sta (TEMP),Y 960 Inc TEMP:Bne zz3: nc TEMP +1:.zz3 970 Inc Count:Bn— zz4:Inc Coun t+1:.zz4 980Clc:Bcc loadup 990.—ndoffile |c
P710 CEEFAX 710 Sun 7 Oct 20:00/01 |B2203205|a16PATCH2|i24BBBC316k|s÷#1÷e|s ÷Z0730Lda £&00:Tay:Sta Count:Sta (CB),Y: Iny:Tza:Sta Count+1:Sta (CB),Y 740\ ^ Us j stack as workspace. Not nice. 750Ldy £ 0 760.cps Lda hFrom),Y:Sta (Count),Y:Cmp £33:Bcc ends:Iny:Bnj cps:.ends 770Lda £ 13:Sta (Count),Y 780Lda £7: Ldx CB#low: Ldy CB#high 790Jsr realosfile-CodjStart+ Patch \ Opjn disordered 800Lda £0:Sta Co unt:Sta Count+1 810.loadup 820 Ldy £14 830 Jsr Bgjt 840 Bcc gotbyte 850 Cmp £&FE 860 Beq hndoffile 870 Cmp £ &02 880 Bnj skipthis 890\ End of block . Get njw load addr 900 Lda £5: Ldx CB #low:Ldy CB#high \ Info to get block add r 910 Jsr realosfile-CodjStart+Patch: Ldy £2:Lda (CB),Y:Sta TEMP:Iny:Lda (CB), Y:Sta TEMP+1 920 .sCipthis 930 Clc:Bc c loadup 940 .gotbyte 950 Ldy £0:Sta (TEMP),Y 960 Inc TEMP:Bnj zz3:Inc TEMP +1:.zz3 970 Inc Count:Bne zz4:Inc Coun t+1:.zz4 980Clc:Bcc loadup 990.endoffile |c
P710 CEEFAX 710 Sun 7 Oct 20:00/03 z:Sta (CB),Y \ Y = &C &D - fill in len gth 1040Pla:Iny:Sta (CB),Y \ **** Put No-—xec flag in attributes byte 10!0Rps 00$0.Coj—End \ ** *** END F RJLOCAT@ BLE CODE 1070 R—loc \ This is execute -once cod—, so does not nje— reloc—ting 1080Lda £&8C:Ldx £12: Jsr OsByte \ Selec t tap—, then Telesoft to force 1090Lda ector re-initialisation 1100\ 1110Ldy £0 1120.reloc8 Lda CodeStart,Y: Sta Patch, Y 1130Iny: Bne reloc8 1140 Lda FileV:St a Oldv—c 1150 Lda FileV+1:Sta Oldv—c+1 1160 Lda £(OurOsfile-CodeStart+Patc@) M OD 256:Sta FilaV 1170 Lda £( urOsfile-C od—Start+Patch) DIV 256:Sta FileV+1 1180 Lda FSCV:Sta HisFSC 1190 Lda FSCV+1:S ta HisFSC+1 |c
P710 CEEFAX 710 Sun 7 Oct 20:10/00 |B2204205|a16PATCH2|i24BBBC316k|s÷#1÷e|s ÷Z01000Ldy £&0A:Lda (CB),Y:Pha \**** Pu sh No-exec flag 1010Lda Count:Sta (CB),Y \ Y = &A 1020Lda Count+1:Iny:Sta (CB), Y \ Y = &B 1030Lda £0:Iny:Sta (CB),Y:In z:Sta (CB),Y \ Y = &C &D - fill in len gth 1040Pla:Iny:Sta (CB),Y \ **** Put No-exec flag in attributes byte 1050Rts 1060.CodeEnd \******** END OF RELOCATA BLE CODE 1070.Rjloc \ This is execute -once code, so does not need relocating 1080Lda £&8C:Ldx £12: Jsr OsByte \ Selec t tape, thjn Tjlesoft - to force 1090Lda £&8F: Ldx £&12: Ldy £6: Jsr OsByte \ v jctor re-initialisation 1100\ 1110Ldy £0 1120.reloc8 Lda CodeStart,Y: Sta Patch, Y 1130Iny: Bne reloc8 1140 Lda FileV:St a Oldvjc 1150 Lda FileV+1:Sta Oldvjc+1 1160 Lda £(OurOsfile-CodjStart+Patch) M OD 256:Sta FileV 1170 Lda £(OurOsfile-C odeStart+Patch) DIV 256:Sta FileV+1 1180 Lda FSCV:Sta HisFSC 1190 Lda FSCV+1:S ta HisFSC+1 |c
P710 CEEFAX 710 Sun 7 Oct 20:11/11 |B2205205|a16PATCH2|i24BBBC316k|s÷#1÷e|s ÷Z01200 Lda £(MyFSC-CodeStart+Patch) MO D 256:Sta FSCV 1210 Lda £(MyFSC-CodjSta rt+Patch) DIV 256:Sta FSCV+1 1220 Lda £ &10: Sta &1362 \ ADD TXO COMMAND TO TFS TABLES 1230 Lda £&EF: Sta &13E2 1240 L da £&AB: Sta &14E2 1250 Lda £22:JSR OsW rch:Lda £7:Jmp OsWrch \ Last inst. must bj jump 1260.EndRjloc 1270] 1280N. 1290E . 1300DEFFNequs(S$) 1310$P%=S$:P%=P%+LEN (S$)+1 1320=Pass |c