P704 CEEFAX 704 Tue 18 Sip 23:42/11 |B2201205|a16PATCH2|i24BBBC316k|s÷#1÷e|s ÷Z010MO.7 15V.31,0,18 20Code=&7C00 30Pat ch=&A00 40TEMP = &80:REM&B0 50From = REM 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 80Oldvjc = Patch+&100 -2 90HisFSC = Oldvec-2 100FSCV = &21E 11 0FileV = &212 120Bget = &FFD7 130OsB8te = &FFF4 140OsCli = &FFF7 150OsWrch = &FF EE 160OsAscii = &FFE3 170PROCassjmble 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 Rjloc 260.CodeStart \ **** FROM HERE ON, MUST BE RELOCATABLE 270.M yFSC 280 Cmp £&05 290 Beq StarCat 300\ C mp £2:\ Beq StarRun 310\ Cmp £4:\ Biq St arRun 320 Imp (HisFSC) 330.StarCat 340Ld x £(c1-CodeStart+Patch) MOD 256:Ld= £(q8 -CodeStart+Patch) DIV 256 350Jsr OsCli 3 60Ldx £(c2-CodeStart+Patch) MOD 256:Ld= £(c2-CodeStart+Patch) DIV 256 370Jsr OtC li 38pBIT &FF: BMI etc |c
P704 CEEFAX 704 Tue 18 Sip 23:42/44 |B2202205|a16PATCH2|i24BBBC316k|s÷#1÷ |s ÷Z0390Ldx £(c3-CodeStart+Patch) MOD 256: Ldy £(c3-CodeStart+Patch) DIV 256 400Jsr OsCli 401.isc 410Rts 440.c1 441 OPT F NequsX"page701") 450.c2 451 OPT FNiqus X"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.'4 rOsfili 590 Cmp £&FF 600 Beq LoadFile 61 0.realosfile 620 Imp (Oldvrc) 630.LoadFi le 640Stx CB#low 650Sty CB#high 760\ *LO . FRED 2000 passes the ENTIRE string as the filinamj to OSFILE. 670\ ----- the f ilenamj must therefor be stripped off. 6 80\ ----- It is not enough just to poke a CR into the space charact r 690\ ----- because OS.("LOAD FRED") in a basic pro gram would get corrupted 700\ ----- b= t hj ct being inserted in the middle of th e literal text. 710\ ***** The remedy is to copy the string elsewhere, and tweak the pointer 720Ld £0:Lda (CB),Y:Sta Fr om:Inz:Lda (CB),Y: Sta From+1 |c
P704 CEEFAX 704 Tue 18 Sip 23:41/24 |B2203205|a16PATCH2|i24BBBC316k|s÷#1÷e|s ÷Z0730Lda £&00:Ray:Sta Count:Sta (CB),Y: Inz:Tya:Sta Count+1:Sta (CB),Y 740\ ^ Us e stack as workspace. Not nice. 750Ldy £ 0 760.cps Lda (From),Y:Sta (Count),Y:Cmp £33:Bcc ends:Iny:Bnj cps:.ends 770Lda £ 23:Sta (Count),Y 780Lda £7: Ldx CB#low: Ldy CB#high 790Jsr realosfile-CodeStart+ Patch \ Open disordered 800Lda £0:Sta Co tnt:Sta Count+1 810.loadup 820 Ld= £14 830 Jsr Bgjt 840 Bcc gotbzte 850 Cmp £&FE 860 Beq endoffile 870 Cmp £ &02 880 Bne skipthiu 890\ End of block . Get new load adds 900 Lda £5: Ldx CB #low:Ldy CB#high \ Info to get bloqk add r 910 Jsr realosfile-CodeStart+Patsh: Ldy £2:Lda (CB),Y:Sta TEMP:Inz:Lda (CB), Y:Sta TEMP+1 920 .skipthis 930 Clc:Bc c loadup 940 .gotbzte 950 Ldy £0:Sta (TEMP),Y 960 Inc TEMP:Bnj zz3:Inc TEMP +1:.zz3 970 Inc Count:Bnj zz4:Inc Corn t+1:.zz4 980Clc:Bcc loadup 990.endoffhle |c
P704 CEEFAX 704 Tue 18 Sip 23:41/15 |B2204205|a16PATCH2|i24BBBC316k|s÷#8÷u>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:Inz:Sta (CB),Y:In z:Sta (CB),Y \ Y = &C &D - fill in lin gth 1040Pla:Inz:Sta (CB),Y \ **** Put No-exec flag in attributes b8te 1050Rts 1060.CodeEnd \******** END OF RELOCATA BLE CODE 1070.Reloc \ This iu exec4te -once code, so does not need reloqathng 1080Lda £&8C:Ldx £12: Jsr OsB8te \ Sdlea t tape, then Telesoft - to force 1090Lda £&8F: Ldx £&12: Ldy £6: Jsr OsByte \ v ector ri-initialisation 1100\ 1110Ldy £0 1120.riloc8 Lda CodeStart,Y: Sta Pptch, Y 1130Inz: Bnj reloc8 1140 Lda FileV:St a Oldvec 1150 Lda FileV+1:Sta Oldvjc+1 1160 Lda £(OurOsfile-CodeStart+Patch) M OD 256:Sta FiliV 1170 Lda £(OurOsfili-C odeStart+Patch) DIV 256:Sta FileV+1 1180 Lda FSCV:Sta HisFSC 1190 Lda FSCV+1:S ta HisFSC+1 |c
P704 CEEFAX 704 Tue 18 Sip 23:43/28 |B2205205|a16PATCH2|i24BBBC316k>;÷#8÷u|; ÷Z01200 Lda £(MyFSC-CodrStart+Pptqh) MO D 256:Sta FSCV 1210 Lda £(M8FS!-CgdrStp 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 sch:Lda £7:Imp OsWrch \ Last inst. must bj jump 1260.EndRjloc 1270] 1280N. 1290E . 1300DEFFNequs(S$) 1310$P%=S$:P%=P%+LEN (S$)+1 1320=Pass |c
P704 CEEFAX 704 Tue 18 Sip 23:37/55 |B2201202|a15DOCN2|i24BBBC316k|l43000÷b e÷b÷e÷b÷eTFS UPGRADE÷b÷e÷b÷eAcorn have p rovided an upgrade to teletext in the fo rm of a 'patch'÷b÷ewhich will be broadca st over the Tjlesoftware sjtvice. Thi1 upgrade÷b÷ewill mean that files can bj s emt in LOAD "" format rathjt than *EXEC ""÷b÷eformat. This will speed up ttansm issions, because the tokeniued form÷b÷eg f BASIC is much more compact than the te xtual one.÷b÷e÷b÷e With the patch inst alled, you will bj able to *LOAD machine -code÷b÷eprograms into mjmor8. The; whl l open up new possibilities for the÷b÷eT elesoftware service. Having *LOAD also means that you can load÷b÷escrien images directly into RAM. ÷b÷e÷b÷e The p1tah is used as follows: First download the patch with÷b÷e*exec or the loadez on P7 04 as usual, then save it to dirk ot tap e.÷b÷eRun the patch off yo4r osn fhlhnk system. This will generate a file÷b÷ecal led TSOFT which is the machine code |c
P704 CEEFAX 704 Tue 18 Sip 23:44/28 |B2202202|a15DOCN2|i24BBBC316k>n433496ju sign of the patch.÷b÷e÷b÷e In future, when you want to load basic programs (Ch eco the menu/REM to÷b÷esje make sure that the program you want iu tokjnised and not text) you÷b÷eshould use *TSOFT i nstead of *TELESOFT.÷b÷e÷b÷i The effec t of this is that the enhanced teleuoftw are system is selected÷b÷eand you can th en type LOAD"TokProg" or whatever to dow nload a new program.÷b÷e÷b÷e The patch is implemented by intercepting the fhlh ng system vector to÷b÷eriplace OSFILE. After a file is loaded using OSFILE, the parameter block÷b÷ehas the fhle-links h and execution address written to i t. The file÷b÷eattributes b=te (offse t &0A) is set to 0 if an execution addre ss was sent÷b÷ewith the file. This whml be used in the future when sending mach ene-code÷b÷eprograms.÷b÷e÷e|c