8-Bit Software Online Conversion
Large Text Printing - Listing
10DEFFNS="LfontEd"
20REM PAGE+&600 on BBC B
30IF PAGE<>&1F00:PAGE=&1F00:CHAIN"Lfo
nted"
40*FX20,6
50 MODE4
60 VDU28,0,4,39,0
70 VDU24,0;0;1180;848;
80 VDU23,1,0;0;0;0;
90 *FX4,1
100 VDU19,0,4;0;
110 VDU19,1,3;0;
120 ONERROR:
130 CLS:CLG:PRINT"Do you want to see t
he demo? y/n "
140 A$=GET$
150 IFA$="Y"ORA$="y":CLS:PROCdemo
160 a%=194:d%=840
170:
180 ONERROR
190 CLS:VDU23,1,0;0;0;0;
200 REPEAT
210 PROCtitle
220 PLOT4,a%-8,d%-70:PLOT5,a%-56,d%-70
230 D%=GET
240 PLOT7,a%-8,d%-70
250 IFD%>31 AND D%<127:PROCplotchar
260 PROCkeys
270 UNTILFALSE
280:
290 DEFPROCtitle
300 VDU30
310 PRINT" **** Large Font Text Edi
tor ****"
320 PRINT
330 PRINT" Ctrl+ <C>lear <F>ont
<L>oad"
340 PRINT" <P>rint <S>ave"
350 ENDPROC
360:
370 DEFPROCplotchar
380 ?&70=D%
390 X%=&70:Y%=0:A%=10:Q%=USR(&FFF1)
400 FOR f%=0 TO 7
410 C%=?(&71+f%)
420 h1%=d%-f%*8
430 h2%=h1%-4
440 FOR i%=0 TO 7
450 p1%=a%-i%*8
460 p2%=p1%-8
470 IFC%AND1:ltype%=5 ELSE ltype%=7
480 PLOT4,p1%,h1%
490 PLOTltype%,p2%,h1%
500 PLOT4,p1%,h2%
510 PLOTltype%,p2%,h2%
520 C%=C%DIV2
530 NEXT:NEXT
540 PROCright
550 ENDPROC
560:
570 DEFPROCright
580 a%=a%+64+8
590 IF a%>1130 AND d%>168:PROCnewline
600 IF a%>1130 AND d%=168:a%=1130
610 ENDPROC
620:
630 DEFPROCnewline
640 d%=d%-64-32:a%=194
650 ENDPROC
660:
670 DEFPROCdelete
680 IFa%>194:a%=a%-64-8:PROCdodel:ENDP
ROC
690 IFd%=840:ENDPROC
700 a%=1130:d%=d%+64+32
710 PROCdodel:ENDPROC
720:
730 DEFPROCdodel
740 IFa%=1130:adj%=1 ELSE adj%=0
750 D%=32:PROCplotchar
760 IFadj%:a%=1130:d%=d%+64+32 ELSE a%
=a%-64-8
770 ENDPROC
780:
790 DEFPROCkeys
800 IF D%=3:PROCclear
810 IF D%=6:PROCchfont
820 IF D%=12:PROCload
830 IF D%=13 AND d%>168:PROCnewline
840 IF D%=16:PROCprint
850 IF D%=19:PROCsave
860 IF D%=127:PROCdelete
870 IF D%=136 AND a%>194:a%=a%-64-8
880 IF D%=137 AND a%<1130:a%=a%+64+8
890 IF D%=138 AND d%>168:d%=d%-64-32
900 IF D%=139 AND d%<832:d%=d%+64+32
910 ENDPROC
920:
930 DEFPROCchfont
940 PROCgetfile("Change Font","F.*")
950 IFf$="":f$="BBC"
960 IFINSTR(f$,"."):f$=MID$(f$,INSTR(f
$,".")+1)
970 F%=OPENIN("F."+f$)
980 PROCdofont
990 CLOSE#F%
1000 ENDPROC
1010:
1020 DEFPROCdofont
1030 FORch%=32TO126
1040 VDU23,ch%
1050 FORI%=0TO7:VDUBGET#F%:NEXT
1060 NEXT
1070 ENDPROC
1080:
1090 DEFPROCload
1100 PROCgetfile("Load Screen","S.*")
1110 IFf$="":f$="INTRO"
1120 IFINSTR(f$,"."):f$=MID$(f$,INSTR(f
$,".")+1)
1130 OSCLI("LOAD S."+f$)
1140 a%=194:d%=840
1150 ENDPROC
1160:
1170 DEFPROCgetfile(Q$,T$)
1180 VDU12,14
1190 PRINTQ$;" y/n"
1200 A$=GET$
1210 IF A$<>"Y" AND A$<>"y":VDU12,15:en
d
1220 VDU23,1,1;0;0;0;
1230 CLS
1240 PRINT"Shift to scroll until the fi
lename"
1250 PRINT"prompt appears."
1260 PRINT
1270 OSCLI("INFO "+T$)
1280 PRINT
1290 PRINT"Return on its own will cause
the"
1300 PRINT"default file to be loaded."
1310 PRINT
1320 INPUT"Filename "f$
1330 VDU23,1,0;0;0;0;
1340 VDU12,15
1350 ENDPROC
1360:
1370 DEFPROCsave
1380 VDU12
1390 PRINT"Save Screen y/n"
1400 A$=GET$
1410 IF A$<>"Y" AND A$<>"y":VDU12:ENDPR
OC
1420 VDU23,1,1;0;0;0;
1430 INPUT"Filename "f$
1440 IFINSTR(f$,"."):f$=MID$(f$,INSTR(f
$,".")+1)
1450 VDU23,1,0;0;0;0;
1460 VDU12
1470 OSCLI("SAVE S."+f$+" 5800 7FFF")
1480 ENDPROC
1490:
1500 DEFPROCclear
1510 VDU12
1520 PRINT"Clear Screen y/n "
1530 A$=GET$
1540 IF A$<>"Y" AND A$<>"y":VDU12:ENDPR
OC
1550 VDU12
1560 CLG:a%=194:d%=840
1570 ENDPROC
1580:
1590 DEFPROCprint
1600 VDU12
1610 PRINT"Print Screen y/n "
1620 A$=GET$
1630 IF A$<>"Y" AND A$<>"y":VDU12:ENDPR
OC
1640 CLS:PRINT"Printer Ready? Hit a Key
"
1650 A$=GET$
1660 PROCdoprint
1670 VDU12
1680 ENDPROC
1690:
1700 DATA" ************ ",0
1710 DATA"",0
1720 DATA" 8 ",0
1730 DATA" BIT ",0
1740 DATA" SOFTWARE ",0
1750 DATA"",0
1760 DATA" ************ ",1000
1770 DATA"The characters",0
1780 DATA"are plotted in",0
1790 DATA"MODE4 graphics",0
1800 DATA"using each ",0
1810 DATA"character's ",0
1820 DATA"definition as ",0
1830 DATA"the plot data.",1000
1840 DATA"This provides ",0
1850 DATA"a quick method",0
1860 DATA"of producing ",0
1870 DATA"title pages in",0
1880 DATA"a chosen font,",0
1890 DATA"which may be ",0
1900 DATA"saved/printed",1000
1910 DATA"When this text",0
1920 DATA"has finished ",0
1930 DATA"or <ESCAPE> ",0
1940 DATA"takes you into",0
1950 DATA"scrn-edit mode",0
1960 DATA" ",1000
1970 DATA"",0
1980 DATA"Use |- ",0
1990 DATA"",0
2000 DATA"arrow keys to ",0
2010 DATA"move about. ",0
2020 DATA" ",500
2030 DATA"<delete> left ",0
2040 DATA"",0
2050 DATA"ctrl+C = clear",0
2060 DATA"ctrl+F = font ",0
2070 DATA"ctrl+P = print",0
2080 DATA"ctrl+L = load ",0
2090 DATA"ctrl+S = save",1000
2100 DATA" ************ ",0
2110 DATA"* ********** *",0
2120 DATA"** Large **",0
2130 DATA"** Font **",0
2140 DATA"** Text **",0
2150 DATA"** Editor **",0
2160 DATA"* ********** *",0
2170 DATA" ************",0
2180 DATA"XXX",0
2190:
2200 DEFPROCdemo
2210 F%=OPENIN("F.SPACE")
2220 PROCdofont
2230 CLOSE#F%
2240 READ line$,time%
2250 a%=194:d%=840
2260:
2270 REPEAT
2280 pnt%=0
2290 REPEAT
2300 pnt%=pnt%+1
2310 D%=ASC(MID$(line$,pnt%,1))
2320 IF D%=32:PROCright
2330 IFD%<>32:PROCplotchar
2340 UNTILpnt%=LEN(line$)
2350 IFtime%:Z%=INKEY(time%):CLG:a%=194
:d%=840
2360 READ line$,time%
2370 IFline$="":REPEAT:READ line$,time%
:PROCnewline:UNTIL line$<>""
2380 UNTIL line$="XXX"
2390ENDPROC
2400:
2410DEFPROCdoprint
2420CLS:S%=&900
2430VDU26
2440passnumber=S%
2450pattern0=S%+1
2460!pattern0=&0300
2470pattern4=S%+3
2480!pattern4=&3F00
2490pattern1=S%+5
2500!pattern1=&3F260400
2510pattern2=S%+9
2520!pattern2=&49841000
2530!(pattern2+4)=&FF6FB966
2540S%=S%+17
2550PROClimits
2560PROCassemble
2570VDU2,1,27,1,65,1,8
2580VDU1,10,1,10,1,10
2590FOR Y%=1023 TO 0 STEP -16
2600VDU1,27,1,76,1,n1,1,n2
2610FOR X%=0 TO 1279 STEP stepsize
2620!Xlo=X%+Y%*&10000
2630?pass=0
2640CALL pixel
2650NEXT
2660VDU1,10
2670NEXT
2680VDU1,27,1,65,1,12,1,12,3
2690VDU28,0,4,39,0
2700VDU24,0,0,1279,848
2710ENDPROC
2720:
2730DEFPROClimits
2740user=&A00:A%=&87
2750!user=USR(&FFF4)
2760mode=user?2
2770n1=192:n2=3
2780stepsize=4:?passnumber=3:?&80=patte
rn4 MOD 256:?&81=pattern4 DIV 256
2790ENDPROC
2800:
2810DEFPROCassemble
2820osword=&FFF1
2830oswrch=&FFEE
2840Xlo=S%
2850Xhi=S%+1
2860Ylo=S%+2
2870Yhi=S%+3
2880value=S%+4
2890byte=S%+5
2900pass=S%+6
2910count4=S%+7
2920S%=S%+8
2930FOR opt=0 TO 2 STEP 2
2940P%=S%
2950[OPT opt
2960.point
2970LDX #Xlo MOD 256
2980LDY #Xlo DIV 256
2990LDA #9
3000JSR osword
3010RTS
3020.printchar
3030LDA #1
3040JSR oswrch
3050LDA byte
3060JSR oswrch
3070RTS
3080.decy4
3090SEC
3100LDA Ylo
3110SBC #4
3120STA Ylo
3130BCC decYhi
3140RTS
3150.decYhi
3160DEC Yhi
3170RTS
3180.incy16
3190CLC
3200LDA Ylo
3210ADC #16
3220STA Ylo
3230BCS incYhi
3240RTS
3250.incYhi
3260INC Yhi
3270RTS
3280.twobits
3290LDA (&80),Y
3300CPX #0
3310BEQ rotatein
3320.rotateout
3330ROR A
3340ROR A
3350DEX
3360BNE rotateout
3370.rotatein
3380ROR A
3390ROL byte
3400ROR A
3410ROL byte
3420RTS
3430.onebyte
3440JSR point
3450LDY value
3460LDA pass
3470AND #3
3480TAX
3490JSR twobits
3500JSR decy4
3510DEC count4
3520BNE onebyte
3530JSR printchar
3540RTS
3550.pixel
3560LDA #4
3570STA count4
3580JSR onebyte
3590JSR incy16
3600INC pass
3610LDA pass
3620CMP passnumber
3630BNE pixel
3640RTS
3650]
3660NEXT
3670ENDPROC