8-Bit Software Online Conversion
:0.$.MAGREAD - Listing
10REM (c) Andy Nibbs 1991
20:
30ONERRORRUN
40event`n=2
50MODE7:HIMEM=&4000
60VDU23;8202;0;0;0;
70PROCscreen(0,24)
80PROCassemble
90REPEAT
100selected=FNselect
110IFselected=14 PROCprint`info
120IFselected=13 CHAIN":0.!MENU"
130IFprint:CLS:PRINT"printing...":PROC
print:RUN
140PROCshow
150:
160DEFPROCscreen(x,y)
170PRINTTAB(x,0+y)"
?/o¶//¶///¶///////¶¶u";
180PRINTTAB(x,1+y)"
5(`¶4h¶x t¶ No.16
190PRINTTAB(x,2+y)"
5* ¶%*¶? o¶|||||||¶¶¶";
191PRINTTAB(x,3+y)"
¾|÷¶||¶¾|÷¶% ";
200PRINTTAB(x,4+y)"
";
210PRINTTAB(x,5+y)"
220PRINTTAB(x,6+y)"
230PRINTTAB(x,7+y) "
,,,,,,,,,,,,,,,,,,,,l ";
240PRINTTAB(x,8+y) " Problems/he
lp wanted
250PRINTTAB(x,9+y) " Hints and t
ips
260PRINTTAB(x,10+y)" Mailbox
270PRINTTAB(x,11+y)" Programmers
return 8
280PRINTTAB(x,12+y)" Repton repo
rtage
290PRINTTAB(x,13+y)" Review
300PRINTTAB(x,14+y)" System retu
rn
310PRINTTAB(x,15+y)" Tech Tips n
umber 3
320PRINTTAB(x,16+y)" Archiving a
rticle
330PRINTTAB(x,17+y)" 8 BIT NEWS
340PRINTTAB(x,18+y)" Next month
350PRINTTAB(x,19+y)" Footnote to
magazine
360PRINTTAB(x,20+y)" On this mon
th's disc
370PRINTTAB(x,21+y)" View softwa
re menu
380PRINTTAB(x,22+y)" Print an ar
ticle.
390PRINTTAB(x,23+y)"
,,,,,,,,,,,,,,,,,,,,,";
400ENDPROC
410:
420DEFFNselect
430line=0
440printline=14
450PROCputbar
460REPEAT
470TIME=0:REPEATUNTILTIME>2
480IF INKEY-58 AND line>0 THEN A%=19:C
ALL&FFF4:PROCrembar:line=line-1:PROCputb
ar
490IF INKEY-42 AND line<printline THEN
A%=19:CALL&FFF4:PROCrembar:line=line+1:
PROCputbar
500UNTILINKEY-74
510print=INKEY-56
520=line
530:
540DEFPROCputbar
550y=FNy
560PRINT TAB(4,9+y)CHR$(129)CHR$(157)
TAB(36,9+y)CHR$156
570ENDPROC
580:
590DEFPROCrembar
600y=FNy
610PRINT TAB(4,9+y)" "TAB(36,9+y)" "
620ENDPROC
630:
640DEFFNy
650IFline=printline:=14
660=line
670:
680DEFPROCassemble:DIM bl 20
690FORB%=0TO2STEP2:P%=&4000
700[OPTB%
710.copy
720 STX &70
730 STY &71
740 LDA #19
750 JSR &FFF4
760 LDX #4
770 LDA #&7C
780 STA &73
790 LDA #0
800 STA &72
810.loop1
820 LDY #0
830.loop2
840 LDA (&70),Y
850 STA (&72),Y
860 INY
870 BNE loop2
880 INC &73
890 INC &71
900 DEX
910 BNE loop1
920 RTS
930.screen EQUW 0
940.end EQUW 0
950.read
960 LDA #14
970 LDX #2
980 JSR &FFF4
990 LDA #15
1000 LDX #0
1010 JSR &FFF4
1020 LDA #12
1030 LDX #1
1040 JSR &FFF4
1050 LDA screen
1060 STA &80
1070 LDA screen+1
1080 STA &81
1090 LDX &80
1100 LDY &81
1110 JSR copy
1120 LDA #13
1130 LDX #event`n
1140 JSR &FFF4
1150 LDA #repeat MOD 256
1160 STA &220
1170 LDA #repeat DIV 256
1180 STA &221
1190 LDA #14
1200 LDX #event`n
1210 JMP &FFF4
1220.repeat
1230 PHP:PHA:TXA:PHA:TYA:PHA
1240 LDY #&FF
1250 LDX #&C6 ½ test CURSOR UP key
1260 LDA #129
1270 JSR &FFF4
1280 CPY #&FF
1290 BEQ up`screen
1300 LDY #&FF
1310 LDX #&D6 ½ test CURSOR DOWN key
1320 LDA #129
1330 JSR &FFF4
1340 CPY #&FF
1350 BEQ down`screen
1360 JMP exit
1370.up`screen
1380 LDA &81
1390 CMP screen+1
1400 BNE can`do
1410 LDA &80
1420 CMP screen
1430 BNE can`do
1440 JMP exit
1450.can`do
1460 LDA &80
1470 SEC
1480 SBC #40
1490 STA &80
1500 LDA &81
1510 SBC #0
1520 STA &81
1530.ok`up
1540 LDX &80
1550 LDY &81
1560 JSR copy
1570 JMP exit
1580.down`screen
1590 LDA &80
1600 CLC
1610 ADC #40
1620 STA &80
1630 LDA &81
1640 ADC #0
1650 STA &81
1660 CMP end+1
1670 BCC ok`up
1680 LDA &80
1690 CMP end
1700 BCC ok`up
1710 LDA end
1720 STA &80
1730 LDA end+1
1740 STA &81
1750 JMP ok`up
1760.exit
1770 PLA:TAY:PLA:TAX:PLA:PLP:RTS
1780.runner
1790 LDA#23:JSR&FFEE
1800 LDA#1:JSR&FFEE
1810 LDX#0:TXA
1820.zeroloop
1830 JSR&FFEE
1840 INX
1850 CPX#20
1860 BNE zeroloop
1870 JSR read
1880.rep
1890 LDY #&FF:LDX#&8F:LDA#129
1900 JSR &FFF4:CPY#&FF:BNE rep
1910 LDA#13:LDX#2:JSR&FFF4
1920 LDA#126:JSR&FFF4:BRK:EQUS"Aarticl
e exited":BRK
1930]:NEXT:Q%=P%:ENDPROC
1940:
1950DEFPROCshow
1960IFline=0 :address=&28AC:PROCpages:
ENDPROC
1970IFline=1 :address=&3F32:PROCpages:
ENDPROC
1980IFline=2 :address=&4FC8:PROCpages:
ENDPROC
1990IFline=3 :address=&66A4:PROCpages:
ENDPROC
2000IFline=4 :address=&5F1E:PROCpages:
ENDPROC
2010IFline=5 :address=&786 :PROCpages:
ENDPROC
2020IFline=6 :PROCascii("SYSRET"):ENDP
ROC
2030IFline=7 :address=&9DAA:PROCpages:
ENDPROC
2040IFline=8 :PROCascii("ARCHIVE"):END
PROC
2050IFline=9 :PROCascii("NEWS"):ENDPRO
C
2060IFline=10 :PROCascii("NEXTMON"):END
PROC
2070IFline=11 :address=&0000:PROCpages:
ENDPROC
2080IFline=12 :PROCascii("ONDISC"):ENDP
ROC
2090CLS:PRINT"Not added."
2100:
2110DEFPROCpages
2120handle=OPENIN"TELEMAG"
2130IFhandle=0:CLS:PRINT"Main magazine
file not found.":END
2140X%=bl MOD 256
2150Y%=bl DIV 256
2160A%=3
2170?bl=handle
2180bl!1=Q%
2190PTR#handle=address
2200INPUT#handle,size
2210bl!5=size+1000
2220bl!9=PTR#handle
2230CALL&FFD1
2240CLOSE#handle
2250?screen=Q% MOD 256
2260screen?1=Q% DIV 256
2270size=size+Q%
2280?end=size MOD 256
2290end?1=size DIV 256
2300CLS
2310CALLrunner
2320ENDPROC
2330:
2340 DEFPROCprint`info
2350 CLS
2360x=0:y=0
2370 PRINTTAB(x,0+y)"
2380 PRINTTAB(x,1+y)"
2390 PRINTTAB(x,2+y)"
";
2400 PRINTTAB(x,3+y)"
,,,,,,,,,,,,,,,,,,,,,l";
2410 PRINTTAB(x,4+y)" To print any ar
ticle from the menu
2420 PRINTTAB(x,5+y)" out:
2430 PRINTTAB(x,6+y)"
2440 PRINTTAB(x,7+y)" 1) Turn your pr
inter on and get it
2450 PRINTTAB(x,8+y)" ready to rec
ieve text.
2460 PRINTTAB(x,9+y)"
j";
2470 PRINTTAB(x,10+y)" 2) Position cu
rsor over article
2480 PRINTTAB(x,11+y)" using curso
r keys.
2490 PRINTTAB(x,12+y)"
j";
2500 PRINTTAB(x,13+y)" 3) Press and h
old P down and whilst
2510 PRINTTAB(x,14+y)" still holdi
ng P down tap return.
2520 PRINTTAB(x,15+y)" This is an
action not disimilar
2530 PRINTTAB(x,16+y)" to shift-br
eak.
2540 PRINTTAB(x,17+y)"
j";
2550 PRINTTAB(x,18+y)" 4) The article
should print.
2560 PRINTTAB(x,19+y)"
j";
2570 PRINTTAB(x,20+y)" see: footnote
to magazine article
2580 PRINTTAB(x,21+y)" for furth
er information.
2590 PRINTTAB(x,22+y)"
j";
2600 PRINTTAB(x,23+y)"
,,,,,,,,,,,,,,,,,,,,,,.";
2610*FX15 1
2620A=GET
2630RUN
2640DEFPROCprint
2650FORa=0 TO line:READd$:NEXT
2660ch=OPENINd$
2670DATA help,hints,mailbox,progret,rep
ton,review,sysret,tectips,archive,news,n
extmon,footnot,ondisc
2680IFch=0:CLS:PRINT"text file not foun
d":END
2690:
2700VDU2
2710REPEAT
2720x=BGET#ch
2730VDUx:IFx=13:VDU10
2740UNTILEOF#ch
2750VDU3
2760CLOSE#ch
2770VDU6
2780ENDPROC
2790:
2800DEFPROCascii($&900):CHAIN"ASCII"