> TtxToPROC , Make a PROC to display a teletext page : (8 ctrl% 31,mem% 1023:X%=ctrl%:Y%=X%256:in%=0:out%=0 2 :CloseAll:: <, "Create PROC to display teletext page" F "Input file: "in$ P3size%=1024:in%=(fname(in$)): in%:size%=#in% Z "Frame number (1"; d: size%>1024: "-";(size%+1023)1024;") "; ") "; n ""ptr%: ptr%<1:ptr%=1 x9 "Procedure name: "proc$: proc$="":proc$="page" 6 "Start line number: "line%: line%=0:line%=1000 4 "Line step: "step%: step%=0:step%=10 "Output file: "out$ ! "(T)ext or (B)asic: "type$ , "Bb",type$,1)):type$="B" type$="T" : ' in%=0:"File '"in$"' not found": Kptr%=(ptr%-1)*1024: ptr%+1>size%:"Frame past end of file":CloseAll: Dout%=(fname(out$)): out%=0:"Can't save '"out$"'":CloseAll: ! A%=0 1023 4:mem%!A%=0: +gbpb(3,in%,mem%,1024,ptr%):#in%:in%=0 rows%=ttx_rows(mem%)  type$="B":#out%,13 ?text$=tkn(&DD+&F2+proc$+":"+&DB,"DEFPROC"+proc$+":CLS") ; rows%=25 rows%=23:text$=text$+tkn(":"+&EF,":VDU") < rows%=25:text$=text$+"31,39,24,"+mem%?999+",32,30,11" " rows%=23:text$=text$+"10" ,output: row%=0 rows%-1 6- 13;line%;:ptr%=mem%+row%*40:text$="""" @# col%=ptr% ptr%+39+(row%=24) J/A%=?col% 127: A%<32 A%=127:A%=A% &80 T(A$=A%:A$="`#_"+A$,"#_`"+A$,A$),1) ^)text$=text$+A$: A%=34:text$=text$+A$ h col% r; text$,1)=" ":text$=text$,text$-1):text$,1)<>" " |+text$=text$+34: text$="""""":text$="" 2 text$<>"": A%<>32 row%=24:text$=text$+";" "text$=tkn(&F1,"PRINT")+text$ 6 row%=rows%-1:text$=text$+tkn(&BD,"CHR$")+"30;"  output: row%: 13;6;13; text$=tkn(&E1,"ENDPROC") "output: type$="B":#out%,255 #out%:out%=0: + "SetType "+out$+" "+tkn("FFB","FFF")  : &ݤtkn(B$,T$): type$="B":=B$ =T$ :  output < type$="B":out(out%,(line%256)+(line%)+(4+text$)) out(out%,text$+13) line%=line%+step% & 0: :out(o%,A$): A$="": D$ A%=1 A$:#o%,A$,A%,1):: N: XCloseAll bA%=out%:out%=0:A%:#A% lA%=in%:in%=0:A%:#A% v : #ݤfname(A$):=A$+".",?(P-3)=0) #gbpb(A%,chn%,addr%,num%,ptr%) >?X%=chn%:X%!1=addr%:X%!5=num%:X%!9=ptr%:<&FFFFF:&FFD1: A%=1A%=3:#?X%=X%!9 5:A%=1A%=2:#?X%,?X%!1 A%=3A%=4:?X%!1=#?X% 5X%!1=X%!1+1:X%!5=X%!5-1:(#?X% A%>2) X%!5<1: : :ݤttx_rows(D%):A%=919:A%=A%+1:A%>999D%?A%<32:=A%40