10
20
30 :
40 MODE 7:DIM ctrl% 31,mem% 1099:X%=ctrl%:Y%=X%DIV256
50 file$="testpg25":okT%=TRUE:ON ERROR okT%=FALSE
60 IF okT%:T$=TIME$
70 ON ERROR PRINTTAB(0,24);SPC39;:PRINTTAB(0,23);LEFT$(CHR$10,?(TOP-3)=0);:REPORT:VDU 23,1,1;0;0;0;32:IF file$="":END ELSE file$="":IF ERR<>17:PRINT
80 REPEAT
90 IF file$="":PRINTCHR$13;SPC39;CHR$13;:INPUT "Display file: "file$
100 UNTIL file$<>"":PROCttx_load(file$,mem%)
110 VDU 23,1,0;0;0;0; 23;2,52;0;0;0:PROCttx_show(mem%)
120 REPEAT
130 T$=FNtime
140 IF VALMID$(T$,5):PRINT TAB(19,0);CHR$&87;LEFT$(T$,3);" ";MID$(T$,5,7);CHR$&82;RIGHT$(T$,8)
150 T%=TIME+50:REPEAT UNTIL TIME>T%
160 UNTIL FALSE
170 :
180 DEFPROCttx_show(D%):VDU12,31,39,24,D%?999OR&80,32,30,11:FORA%=0TO998:VDUD%?A%OR&80:NEXT:ENDPROC
190 :
200 DEFPROCttx_load(A$,D%):A%=0:REPEAT:$D%=STRING$(80,CHR$128):$(D%+920)=$D%
210 OSCLI"LOAD "+A$+LEFT$(".",?(TOP-3)=0)+" "+STR$~(D%+A%):A%=A%+40
220 UNTIL(D%!&3B0<>0ANDD%!&3D0<>0)ORA%>40:ENDPROC
230 :
240 DEFFNtime:IFokT%:=TIME$ELSE?X%=0:A%=14:CALL&FFF1:IF?X%=0:=""ELSE=$X%