8-Bit Software Online Conversion

Teletext editor v2 (Master) - Listing

10REM 7£5 £k j5 up jpz5 5 j j££ pp¶¶¶¶ 7¶¾zn z0 'kws'¼tz75£7wstzwquz£;6 g;uz7ks¼:::,;;;, [[[,===,]]],^^^ 20REM7k7k7;uz7£up7iu:w3upw35 7+u¼uz5j j j jd:u&7d5 up¾÷5k=z5j7kuz7k7£7ku÷7k7i w3r¼k£j 5juz5jm>5z?oe*4ie:8!£;vp ,111 30REM w>4 w5 w1 4w5p0¾1p0= w5,%4 75 ` h 5-%40744 u 7o 75 w5w5% w5 - 7% p y t 5 jz e% un 91u5,%p0x1 40DEFFNS="TXT2":REM By C.J.Richardson . 50MODE7:FORL%=1TO2:PRINT"  60ONERROR:VDU7:GOTO110 70MODE7:HIMEM=&1A00:C%=0:DIMM%(6):X%= 0:W%=0:B%=HIMEM 80DATA64,16,8,4,2,1 90PROCh(0,23," ",""):PROCh(0,24," f4-insert f5-delete f6-clear text",""): PROCh(0,0," COPY toggles pixel editor, now OFF",""):PROCh(0,1," f0-save f1-l oad f2-down f3-up ","") 100B%=B%+&190:CALLF%:PROCi:PROCa 110REPEAT:CALLE%:PROCh(3,23,"Chr="+STR $?D%+" ",""):A%=ASCGET$:IFX%=40X%=39:VDU 83 120IFA%=127UNTILFALSE 130IFA%<27PROCg:?(B%+X%)=A%:VDUA%:X%=X %+1:UNTILFALSE 140IFA%>127IFA%<135PROCd:UNTILFALSE 150IFA%>135IFA%<140PROCe:UNTILFALSE 160IFA%=135PROCk:UNTILFALSE 170IFA%=144PROCf:UNTILFALSE 180IFA%=145PROCj:UNTILFALSE 190IFA%=146W%=W%EOR1:IFW%=0PROCh(34,1, " ",""):UNTILFALSE 200IFA%=146PROCh(34,1,"Font",""):UNTIL FALSE 210IFA%=147PROCh(3,23,"Font to load"," I"):OSCLI"LO."+S$:UNTIL FALSE 220IFW%PROCl:UNTILFALSE 230IFC%=1PROCc 240VDUA%:?(B%+X%)=A%:IFC%=1VDU8 ELSE X %=X%+1:IFX%=40:X%=0:A%=138:PROCe 250UNTILFALSE 260DEFPROCb 270VDU21:FORL%=0TO3:P%=&900:[:OPTL%:.D %:NOP:.E%:LDA#&87:JSR&FFF4:STXD%:RTS:.F% :LDA#32:STA&1A00:LDAF%+3:INA:STAF%+3:BEQ G%:JMPF%:.G%:LDAF%+4:CMP#&7B:BEQH%:INA:S TAF%+4:JMPF%:.H%:LDA#&1A:STAF%+4:STZF%+3 :RTS 280.T%:STA&1111:LDA#&7A:STAS%+2:STAS%+ 5:LDA#&68:STAS%+4:DEA:STAS%+1:RTS 290.S%:LDA&7A67:STA&7A68:LDAS%+1:CMP#0 :BNEK%:DECS%+2:.K%:LDA S%+4:CMP#0:BNE R% :DECS%+5:.R%:DECS%+1:DECS%+4:LDAS%+4:CMP T%+1:BNES%:LDAS%+5:CMPT%+2:BNES%:LDA#32: JMPT% 300.V%:LDA&1111:STA&1111:LDAV%+1:CMP#& FF:BNEZ%:INCV%+2:.Z%:LDAV%+4:CMP#&FF:BNE U%:INCV%+5:.U%:INCV%+1:INCV%+4:LDAV%+1:C MP#&69:BNEV%:LDAV%+2:CMP#&7A:BNEV%:RTS 310]:NEXT 320OSCLI"K.0DEL.260,330|M40|M50|M*FX 4 1|M*FX225 128|MV.6|MRUN|M":OSCLI"FX138 0 128":END 330ENDPROC 340DEFPROCc:CALLE%:I%=(?D%)-160:RESTOR E:FORL%=6TO1STEP-1:READN%:J%=I%-N%:IF J% >-1 M%(L%)=N%:I%=J% ELSE M%(L%)=0 350NEXT:IF A%>90 A%=A%-32 360IFA%=81M%(1)=M%(1)EOR1 370IFA%=87M%(2)=M%(2)EOR2 380IFA%=65M%(3)=M%(3)EOR4 390IFA%=83M%(4)=M%(4)EOR8 400IFA%=90M%(5)=M%(5)EOR16 410IFA%=88M%(6)=M%(6)EOR64 420A%=160:FORL%=1TO6:A%=A%+M%(L%):NEXT :ENDPROC 430DEFPROCd:IFA%=128PROCh(3,23,"Save t o cursor ","I"):IFS$<>""OSCLI"SA."+S$+" 1B90 "+STR$÷(B%+X%+1) 440IFA%=129PROCh(3,23,"Load to cursor ","I"):IFS$<>""OSCLI"LO."+S$+" "+STR$÷(B %+X%) 450IFA%=134PROCh(3,23,"CLEAR Y/N","I") :IFS$="Y"RUN 460IFA%=132?(T%+1)=(B%+X%)MOD256:?(T%+ 2)=(B%+X%)DIV256:?&7A67=32:CALLS% 470IFA%=133?(V%+1)=(B%+X%+1)MOD256:?(V %+2)=(B%+X%+1)DIV256:?(V%+4)=(B%+X%)MOD2 56:?(V%+5)=(B%+X%)DIV256:CALLV% 480IFA%=130IFB%<&7738 B%=B%+800 490IFA%=131IFB%>&1E88 B%=B%-800 500PROCa:VDU31,X%,10:ENDPROC 510DEFPROCe 520IFA%=136X%=X%-1:IFX%=-1X%=39 530IFA%=137X%=X%+1:IFX%=40X%=0 540IFA%=139IFB%>&1B90VDU23,7,0,2,0,0,0 ,0,0,0,30:B%=B%-40:FORL%=0TO39:VDU?((B%- 400)+L%):NEXT 550IFA%=138IFB%<&7A2FVDU23,7,0,3,0,0,0 ,0,0,0,31,0,20:B%=B%+40:FORL%=0TO39:VDU? ((B%+400)+L%):NEXT 560VDU31,X%,10:ENDPROC 570DEFPROCg:A%=A%+128 580IFA%=138A%=156 590IFA%=139A%=157 600IFA%=142A%=158 610IFA%=143A%=159 620ENDPROC 630DEFPROCh(O%,Q%,t$,q$):VDU26:PRINTTA B(O%,Q%);t$; 640IFq$="I":INPUTS$:PRINTTAB(3,23)STRI NG$(32," ") 650VDU28,0,22,39,2,31,X%,10:ENDPROC 660DEFPROCa:VDU30:FORL%=B%-400TOB%+439 :VDU?L%:NEXT:VDU31,X%,10:ENDPROC 670DEFPROCi:FORL%=&1B68TO&1B8F:?L%=64: NEXT:FORL%=&7A69TO&7A8F:?L%=64:NEXT:ENDP ROC 680DEFPROCk:C%=C%EOR1:IFC%=1:S$="ON " ELSE S$="OFF" 690PROCh(34,0,S$,""):ENDPROC 700DEFPROCf:PROCh(3,23,"Mark end of cu t. ",""):Y%=B%+X%:REPEAT:A%=GET:PROCe:UN TILA%=13:PROCh(3,23,"Filename for cut"," I"):IFS$=""ENDPROC ELSE OSCLI"SA. "+S$+" "+STR$÷Y%+" "+STR$÷(B%+X%+1):ENDPROC 710DEFPROCj:PROCh(3,23,"Filename for p aste ","I"):IFS$=""ENDPROC ELSE L%=OPENI NS$:FORO%=0TOEXT#L%-1:A%=BGET#L%:IFA%=32 NEXT:CLOSE#L%:PROCa:ENDPROC ELSE ?(B%+O% +X%)=A%:NEXT:CLOSE#L%:PROCa:ENDPROC 720DEFPROCl:L%=&E05+((A%-32)*4):?(B%+X %)=?L%:?(B%+X%+1)=?(L%+1):?(B%+40+X%)=?( L%+2):?(B%+41+X%)=?(L%+3):VDU?L%,?(L%+1) ,10,8,8,?(L%+2),?(L%+3):ENDPROC