8-Bit Software Online Conversion
:2.$.F7_FAX - Listing
10REM > F7`fax
20:
30REM Teletext core program
40:
50REM By Andrew J Nibbs
60REM (c) Swig soft 1990
70:
80ON ERROR OSCLI("DRIVE 0"):CHAIN"!Me
nu"
90MODE7
100VDU23;8202;0;0;0;
110HIMEM=&7000-1000
120FORx=HIMEM TO &7000 STEP 4:!x=0:NEX
T
130DIM e(2)
140frame=97
150mf=123
160page$="010"
170PROCass
180:
190PROCloadpage
200silly$=page$
210PROCtopline
220TIME=0
230new`page=FALSE
240REPEAT
250*FX15
260x=GET
270IF x=32:TIME=1000
280PROCnext`frame
290IFnotload:GOTO220
300GOTO190
310:
320DEFPROCass:FORB%=0TO2STEP2:P%=&A00:
[OPTB%:.rep LDA#&7C:STA&81:LDA#0:STA&80:
LDX#4
330.loop1 LDY#0:.loop2 LDA s:CMP(&80),
Y:BEQ fs:.cafs INY:BNE loop2:INC&81:DEX:
CPX#0:BNE loop1:RTS:.fs LDA r:STA(&80),Y
:JMPcafs:.r NOP:.s NOP
340.load80 LDA#0:STA&82:LDA#&7C:STA&83
350.outer2 LDY#0:.inner2 LDA(&80),Y:ST
A(&82),Y:INY
360BNE inner2:INC&83:INC&81:LDA &83:CM
P#&80:BNE outer2:RTS
370.dtop LDX#0:LDA#32:.dtl STA &7000,X
:INX:CPX#40:BNE dtl:RTS
380]:NEXT:ENDPROC
390:
400DEFPROCreveal
410?s=152:?r=142:CALLrep
420REPEATUNTILNOT(INKEY(-52))
430?s=142:?r=152:CALLrep
440ENDPROC
450:
460DEFPROCnext`frame
470frame=frame+1
480IFframe=mf frame=97
490answer=FNnoex(page$+CHR$frame)
500IF answer AND frame=98:notload=TRUE
:ELSE:notload=FALSE
510IF answer frame=97
520ENDPROC
530:
540DEFPROCxtopage
550notload=FALSE
560frame=97
570op$=page$
580page$=CHR$e(0)
590page$=page$+CHR$e(1)
600page$=page$+CHR$e(2)
610IF FNnoex(page$+CHR$frame):page$=op
$:notload=TRUE
620ENDPROC
630:
640DEFPROCloadpage
650OSCLI"LOAD "+page$+CHR$frame+" 7000
"
660CALLdtop
670FORattledog=&7000-1000 TO &7000 STE
P 40:?&80=attledog MOD 256:?&81=attledog
DIV 256:*FX19
680CALLload80:NEXT
690ENDPROC
700:
710DEFPROCtopline
720VDU30
730PRINTTAB(30)" ";page$ CHR$frame
740ENDPROC
750:
760DEF FNinput
770ent=FALSE
780PRINTTAB(0,0)" ..."
790digit=0
800IF INKEY(-85):=20000
810IF INKEY(-86):=30000
820IF INKEY(-52):=10000
830x=INKEY(0)
840IFx<47 OR x>58:=99999
850ent=TRUE
860GOTO890
870x=GET
880IFx<47 OR x>58:=99999
890digit?&7C01=x
900e(digit)=x
910digit=digit+1
920IFdigit=3 GOTO940
930GOTO870
940=0
950:
960DEF FNnoex(x$)
970y=OPENUP x$:CLOSE#y
980IFy=0:=TRUE
990=FALSE