8-Bit Software Online Conversion
:2.$.NotePad - Listing
10REM Notepad V2 B.RAW K6N 1997
20*TV255
30*FX18
40*FX21
50*KEY10"*EXEC !BOOT|M"
60*FX4,1
62*FX229,1
70*FX225,200
80*FX226,210
90*FX227,220
100MODE7
110VDU23;10,&60;0;0;0
120copy%=0:epson%=0:L%=0:P%=1
130ONERROR:GOTO150
140F%=OPENIN"Ndata":INPUT#F%,L%,P%,eps
on%:CLOSE#F%
150ONERROR:VDU7
160PROCstart
170PROCinit
180:
200REPEAT
210REPEAT
220H%=0
230$W%="Vol"+STR$(P%)
240PROCload
250PROCgettop
260VDU30,157,129
270IFcopy%=0:PRINT"<C>opy <H>elp <I>nd
ex <P>rint <Z>ap "
280IFcopy%=1:PRINT"<C>opy to here or c
ursor keys to move "
290REPEAT
300Q%=GET
310UNTILINSTR("CHIPZchipz",CHR$(Q%))OR
Q%=13ORQ%=27ORQ%>135
320IFQ%>127:T%=0
330IFQ%=67ORQ%=99:PROCcopy
340IFQ%=72ORQ%=104:PROChelp1
350IFQ%=73ORQ%=105:PROCindex
360IFQ%=80ORQ%=112:PROCvprint
370IFQ%=90ORQ%=122:PROCzap
380IFQ%=27:RUN
390IFQ%=136:L%=L%-1
400IFQ%=137:L%=L%+1
410IFQ%=138:P%=P%-1
420IFQ%=139:P%=P%+1
430IFP%<1:P%=M%:L%=L%-1
440IFP%>M%:P%=1:L%=L%+1
450IFL%<0:L%=25
460IFL%>25:L%=0
470UNTILQ%=13 AND H%=0
480VDU30:PRINT$&A00:VDU30,9,9
490E%=E%EOR1:VDU23,1,E%;0;0;0;
500REPEAT
510a%=GET:A%=a%
520IFA%<>27:PROCkeys
530UNTILA%=27
540PROCsave
550E%=E%EOR1:VDU23,1,E%;0;0;0;
560UNTILFALSE
570:
580DEFPROCcopy
590copy%=copy%EOR1
600IFcopy%=1:sl%=L%:sp%=P%:source$=$W%
:ENDPROC
610VDU30:PRINT$&A00:VDU30,9,9
620dl%=L%:dp%=P%:dest$=$W%
630L%=sl%:P%=sp%:$W%=source$
640PROCload
650L%=dl%:P%=dp%:$W%=dest$
660E%=1:PROCsave:E%=0
670ENDPROC
680:
690DEFPROCzap
700VDU30,157,129
710PRINT"Zap this page Y/N ?
"
720Q$=GET$:IFQ$<>"Y"ANDQ$<>"y":ENDPROC
730PROCnewpage:E%=1:PROCsave:E%=0
740ENDPROC
750:
760DEFPROCgettop
770$&A00=""
780FORI%=0TO39
790$&A00=$&A00+CHR$(?(&7C00+I%))
800NEXT
810ENDPROC
820:
830DEFPROCvprint
840VDU30:PRINT$&A00:VDU30,9,9
850PROCprint
860ENDPROC
870:
880DEFPROCkeys
890IFA%=16:PROCprint:ENDPROC
900IFA%=3:PROCnewpage:PROCgettop:ENDPR
OC
910IFA%=13ANDVPOS=24:VDU7:ENDPROC
920IFA%=13:VDU10,13,8:PROCright:ENDPRO
C
930IFINSTR("QWASZXqwaszx",CHR$(a%))<>0
ANDt%:PROCpixel:ENDPROC
940IFA%=136:PROCleft:ENDPROC
950IFA%=137:PROCright:ENDPROC
960IFA%=138:PROCdown:ENDPROC
970IFA%=139:PROCup:ENDPROC
980IFa%>=200ANDa%<=229:PROCfkeys
990IFA%=127:PROCdelete:ENDPROC
1000IFA%=226:PROCinspc:ENDPROC
1010IFA%=227:PROCinsline:ENDPROC
1020IFA%=228:PROCdelline:ENDPROC
1030IFA%=209ORA%=219ORA%=229:PROCptog:E
NDPROC
1040IFE%=0:VDU7:ENDPROC
1050IFVPOS=24ANDPOS=39ANDt%=0:?(&7C27+4
0*24)=A%:VDU7:ENDPROC
1060IFt%=0ANDA%>31:VDUA%,8:PROCright
1070ENDPROC
1080:
1090DEFPROCfkeys
1100IFa%>=200ANDa%<=208:A%=a%-71
1110IFa%>=210ANDa%<=216:A%=a%-65
1120IFa%>=217ANDa%<=218:A%=a%-61
1130IFa%>=220ANDa%<=221:A%=a%-67
1140IFa%>=222ANDa%<=223:A%=a%-64
1150IFa%>=224ANDa%<=225:A%=365-a%
1160ENDPROC
1170:
1180DEFPROCpixel
1190LOCALW%
1200W%=2^((INSTR("QWASZ X",CHR$(A%AND22
3)))-1)
1210K%=&7C00+40*VPOS+POS
1220IF(?K%AND160)<>160:?K%=?K%OR160
1230IF?(K%ANDW%)=W%:?K%=?K%AND(255-W%)E
LSE?K%=?K%EORW%
1240ENDPROC
1250:
1260DEFPROCptog
1270t%=t%EOR1
1280IFt%:VDU23;10,&70;0;0;0 ELSE VDU23;
10,&60;0;0;0
1290ENDPROC
1300:
1310DEFPROCleft
1320IFPOS>2:VDU8:ENDPROC
1330IFVPOS>0:VDU31,39,VPOS-1ELSEVDU7
1340ENDPROC
1350:
1360DEFPROCright
1370IFPOS<39:VDU9:ENDPROC
1380IFVPOS<24:VDU9,9,9ELSEVDU7
1390ENDPROC
1400:
1410DEFPROCdown
1420IFVPOS<24:VDU10ELSEVDU7
1430ENDPROC
1440:
1450DEFPROCup
1460IFVPOS>0:VDU11ELSEVDU7
1470ENDPROC
1480:
1490DEFPROCdelete
1500IFPOS=2ANDVPOS=0:VDU7:ENDPROC
1510org%=&7C00+40*VPOS
1520IFPOS=2:PROCleft ELSE FORI%=POS TO
39:?(org%+I%-1)=?(org%+I%):NEXT:VDU8
1530?(&7C27+VPOS*40)=32
1540ENDPROC
1550:
1560DEFPROCinspc
1570dest%=&7C27+40*VPOS
1580org%=&7C00+40*VPOS+POS
1590diff%=dest%-org%
1600FORI%=0TOdiff%
1610?(dest%-I%)=?(dest%-I%-1)
1620NEXT
1630?org%=32
1640ENDPROC
1650:
1660DEFPROCinsline
1670LOCALP%
1680org%=&70:dest%=&74:end%=&78:stop%=&
7C
1690!org%=&7C27+40*23
1700!dest%=&7C27+40*24
1710!end%=&7C02+40*VPOS
1720!stop%=&7C27+40*VPOS
1730FORI%=0TO2STEP2
1740P%=&980
1750[OPTI%
1760LDY#0
1770.loop
1780LDA(org%),Y:STA(dest%),Y
1790LDAorg%::BNEd1
1800DECorg%+1
1810.d1
1820DECorg%
1830LDAdest%:BNEd2
1840DECdest%+1
1850.d2
1860DECdest%
1870LDAorg%+1:CMPend%+1:BNEloop
1880LDAorg%:CMPend%:BCSloop
1890RTS
1900]NEXT
1910CALL&980
1920REPEAT
1930?!end%=32
1940!end%=!end%+1
1950UNTIL!end%=!stop%+1
1960ENDPROC
1970:
1980DEFPROCdelline
1990LOCALP%
2000org%=&70:dest%=&74:end%=&78:stop%=&
7C
2010!org%=&7C02+40*(VPOS+1)
2020!dest%=&7C02+40*VPOS
2030!end%=&7C27+40*24
2040!stop%=&7C02+40*24
2050FORI%=0TO2STEP2
2060P%=&980
2070[OPTI%
2080LDY#0
2090.loop
2100LDA(org%),Y:STA(dest%),Y
2110INCorg%::BNEd1:INCorg%+1
2120.d1
2130INCdest%:BNEd2:INCdest%+1
2140.d2
2150LDAend%+1:CMPorg%+1:BNEloop
2160LDAend%:CMPorg%:BCSloop
2170RTS
2180]NEXT
2190CALL&980
2200REPEAT
2210?!end%=32
2220!end%=!end%-1
2230UNTIL!end%=!stop%-1
2240ENDPROC
2250:
2260DEFPROCprint
2270O%=&7C00:o%=0:graphic%=0:sep%=0
2280VDU2
2290IFepson%:VDU1,27,1,48
2300FORl%=1TO25
2310FORc%=1TO40
2320d%=?(O%+o%)
2330IFd%<32:d%=32
2340IFepson%=0 AND (d%<32ORd%>126):d%=3
2
2350IFd%>127ANDepson%:PROCeprint
2360IFd%=91ANDepson%:d%=0:VDU1,27,1,75,
1,8,1,0,1,0,1,&10,1,&38,1,&54,1,&10,1,&1
0,1,&10,1,&10
2370IFd%=93ANDepson%:d%=0:VDU1,27,1,75,
1,8,1,0,1,0,1,&10,1,&10,1,&10,1,&10,1,&5
4,1,&38,1,&10
2380VDU1,d%
2390o%=o%+1
2400NEXT
2410IFepson%:VDU1,10
2420VDU1,13:graphic%=0:sep%=0
2430NEXT
2440IFepson%:VDU1,27,1,50
2450VDU1,13,3
2460ENDPROC
2470:
2480DEFPROCeprint
2490IFd%=&80:d%=32:ENDPROC
2500IFd%>&80 AND d%<&88:graphic%=0:d%=3
2:ENDPROC
2510IFd%>&87 AND d%<&91:d%=32:ENDPROC
2520IFd%>&90 AND d%<&98:graphic%=1:d%=3
2:ENDPROC
2530IFd%=&99:sep%=0
2540IFd%=&9A:sep%=1
2550IFd%>&97 AND d%<&A0:d%=32:ENDPROC
2560IFd%>&BF AND d%<&E0:d%=32:ENDPROC
2570IFgraphic%=0:d%=32:ENDPROC
2580PROCpixprint:d%=0
2590ENDPROC
2600:
2610DEFPROCpixprint
2620REM******* FOR EPSON PRINTER ******
2630flag%=0
2640FORn%=0TO6
2650flag%=flag%+(d%AND2^n%)
2660NEXT
2670:
2680VDU1,27,1,ASC"^",1,0,1,6,1,0
2690pr%=0
2700IFflag%AND1:pr%=pr%+&E0-(sep%*&20)
2710IFflag%AND4:pr%=pr%+&1C-(sep%*&04)
2720IFflag%AND16:pr%=pr%+&8003-(sep%*&8
000)
2730IFsep%:VDU1,0,1,0
2740FORn%=sep%TO2
2750VDU1,pr%AND&FF
2760VDU1,(pr%AND&FF00)DIV&100
2770NEXT
2780pr%=0
2790IFflag%AND2:pr%=pr%+&E0-(sep%*&20)
2800IFflag%AND8:pr%=pr%+&1C-(sep%*&04)
2810IFflag%AND64:pr%=pr%+&8003-(sep%*&8
000)
2820IFsep%:VDU1,0,1,0
2830FORn%=sep%TO2
2840VDU1,pr%AND&FF
2850VDU1,(pr%AND&FF00)DIV&100
2860NEXT
2870ENDPROC
2880REM******** FOR EPSON PRINTER *****
2890:
2900DEFPROCnewpage
2910VDU30
2920FORD%=1TO24
2930PRINTCHR$(157)CHR$(132)STRING$(38,"
");
2940NEXT
2950PRINTCHR$(157)CHR$(132)STRING$(37,"
");
2960?(&7C27+40*24)=32
2970VDU30
2980PRINTCHR$(157)CHR$(132)"Volume "STR
$(P%)" Page "STR$(L%+1);
2990PRINTTAB(2,0);
3000ENDPROC
3010:
3020DEFPROCindex
3030oldL%=L%:oldP%=P%
3040FORP%=1TOM%
3050FORL%=0TO25
3060$W%="Vol"+STR$(P%)
3070T%=0:PROCload
3080Q%=INKEY(100)
3090IFQ%=27:P%=M%:L%=25
3100IFQ%=135:oldL%=L%:oldP%=P%:P%=M%:L%
=25
3110IFQ%=136:IFL%>0:L%=L%-2
3120IFQ%=137:IFL%<25:L%=L%+1
3130IFQ%=138:P%=P%-1:L%=-1:IFP%<1:P%=M%
3140IFQ%=139:P%=P%+1:L%=-1:IFP%>M%:P%=1
3150NEXT:NEXT
3160L%=oldL%:P%=oldP%
3170T%=0:Q%=0
3180ENDPROC
3190:
3200DEFPROCload
3210X%=W%MOD256
3220Y%=W%DIV256
3230A%=&C0
3240F%=(USR&FFCE)AND&FF
3250PROCdisc(4,&3E8)
3260PRINTTAB(2,1);
3270VDU23,1,E%;0;0;0;
3280CLOSE#F%
3290ENDPROC
3300:
3310DEFPROCsave
3320X%=W%MOD256
3330Y%=W%DIV256
3340A%=&C0
3350F%=(USR&FFCE)AND&FF
3360T%=0
3370IFE%:PROCdisc(2,&3E8)
3380CLOSE#F%
3390F%=OPENOUT"Ndata":PRINT#F%,L%,P%,ep
son%:CLOSE#F%
3400ENDPROC
3410:
3420DEFPROCdisc(A%,S%)
3430PTR#F%=L%*&3E8
3440B%?0=F%
3450B%!1=&7C00
3460B%!5=S%
3470X%=B%MOD256
3480Y%=B%DIV256
3490CALL&FFD1
3500ENDPROC
3510:
3520DEFPROCstart
3530REM "
3540REM " 0 1 2 3 4 5 6
3550E%=0:VDU23,1,0;0;0;0;
3560REPEAT
3570VDU30
3580PRINT"
";
3590PRINT"
3600PRINT" Instructions
3610PRINT"
3620PRINT" Install your
3630PRINT" preprepared disc
4'¶+j7£!
3640PRINT" before running
5 ¶ jup
3650PRINT" the program or
5 ¶ j5
3660PRINT" install a blank
% ¶ jup0
3670PRINT" formatted disc
3680PRINT" and indicate its
7k4¶£¾
3690PRINT" size to prepare
5j5¶ ¶
3700PRINT" a new disc
7k5¶ ¶
3710PRINT"
5j5¶p?
3720PRINT" Options
3730PRINT"
3740PRINT" Run NotePad
3750PRINT" Epson 9pin NO
3760PRINT" * Command
3770PRINT" Prepare DFS 40T
3780PRINT" Prepare DFS 80T
3790PRINT" Prepare ADFS S
3800PRINT" Prepare ADFS M
3810PRINT" Prepare ADFS L
3820PRINT"
";
3830IFepson%:PRINTTAB(16,17)"YES";
3840O%=&7C00+40*16:S%=-1
3850REPEAT
3860S%=S%+1:IFS%=8:S%=0
3870?(O%+S%*40)=32
3880Q%=GET
3890?(O%+S%*40)=131
3900UNTILQ%=13
3910IFS%=0:ENDPROC
3920IFS%=1:epson%=epson%EOR1
3930IFS%=2:PROCoscli
3940IFS%=3:M%=3
3950IFS%=4:M%=7
3960IFS%=5:M%=6
3970IFS%=6:M%=12
3980IFS%=7:M%=24
3990IFS%>2:PROCprepdisc
4000UNTIL FALSE
4010:
4020ENDPROC
4030DEFPROCprepdisc
4040CLS
4050PRINT'''"Creating a New NotePad"
4060PRINT'" Continue Y/N ? "
4070Q$=GET$
4080IFQ$<>"Y"ANDQ$<>"y":RUN
4090L%=0:P%=1
4100F%=OPENOUT"Ndata":PRINT#F%,L%,P%,ep
son%:CLOSE#F%
4110B%=&900:W%=&9F0
4120FORP%=1TOM%
4130file$="Vol"+STR$(P%)
4140F%=OPENOUTfile$
4150FORL%=0TO25
4160PROCnewpage
4170PROCdisc(2,&3E8)
4180NEXT
4190CLOSE#F%
4200NEXT
4210L%=0:P%=1
4220ENDPROC
4230:
4240REM "
4250REM " 0 1 2 3 4 5 6
4260DEFPROChelp1
4270VDU30,23,1,0;0;0;0;
4280PRINT"
";
4290PRINT"
";
4300PRINT"
¶£¾ ";
4310PRINT"
¶ ¶ ";
4320PRINT"
¶ ¶ ";
4330PRINT"
¶p? ";
4340PRINT"
";
4350PRINT" NOTE PAD HELP 1
";
4360PRINT"
";
4370PRINT" View Mode Cursor O
FF ";
4380PRINT"
";
4390PRINT" C.....Copy this page to
another ";
4400PRINT" H.....This help
";
4410PRINT" I.....Index see next pa
ge ";
4420PRINT" P.....Print Page
";
4430PRINT" Z.....Zap this page
";
4440PRINT" <['>.....Enter edit mode
";
4450PRINT" <Esc>.....Close the NotePad
";
4460PRINT"
";
4470PRINT" Edit Mode Cursor O
N ";
4480PRINT"
";
4490PRINT" Once here any changes you m
ake will ";
4500PRINT" be saved on leaving i.e. af
ter you ";
4510PRINT" hit <Esc>, no prompt is ask
ed for ";
4520PRINT" before saving, <Break> to a
bort. ";
4530Q%=GET
4540IFQ%<>27:PROChelp2
4550H%=1:Q%=13
4560ENDPROC
4570:
4580REM "
4590REM " 0 1 2 3 4 5 6
4600DEFPROChelp2
4610PRINTTAB(0,7);
4620PRINT" INDEX
";
4630PRINT"
";
4640PRINT" Cycles through the whole No
tePad A1-Zn";
4650PRINT" use the cursor keys to :-
";
4660PRINT"
";
4670PRINT" Left/Right...move between p
ages ";
4680PRINT"
";
4690PRINT" Up/Down...move between V
olumes ";
4700PRINT" movment betwee
n Volumes ";
4710PRINT" causes a jump
to page A ";
4720PRINT"
";
4730PRINT" You may exit this routine b
y hitting ";
4740PRINT"
";
4750PRINT" <Copy> to stop at the disp
layed page ";
4760PRINT"
";
4770PRINT" <Escape> to return to the p
age at ";
4780PRINT" which you started
from ";
4790PRINT"
";
4800?(&7C27+40*24)=32
4810Q%=GET
4820IFQ%<>27:PROChelp3
4830H%=1:Q%=13
4840ENDPROC
4850:
4860REM "
4870REM " 0 1 2 3 4 5 6
4880DEFPROChelp3
4890PRINTTAB(0,7);
4900PRINT" NOTE PAD HELP 3
";
4910PRINT"
";
4920PRINT" Ctrl+C....Clear screen
";
4930PRINT" Ctrl+P....Print page
";
4940PRINT"
";
4950PRINT" f0...Red text
";
4960PRINT" f1...Green text
";
4970PRINT" f2...Yellow text
";
4980PRINT" f3...Blue text
";
4990PRINT" f4...Magenta text
";
5000PRINT" f5...Cyan text
";
5010PRINT" f6...White text
";
5020PRINT" f7...Flashing
";
5030PRINT" f8...Steady
";
5040PRINT" f9...Pixel editor
";
5050PRINT"
";
5060PRINT" <Esc>...Save, Return to
View Mode ";
5070PRINT"
";
5080Q%=GET
5090IFQ%<>27:PROChelp4
5100H%=1:Q%=13
5110ENDPROC
5120:
5130REM "
5140REM " 0 1 2 3 4 5 6
5150DEFPROChelp4
5160PRINTTAB(0,7);
5170PRINT" NOTE PAD HELP 4
";
5180PRINT"
";
5190PRINT" Ctrl+C....Clear screen
";
5200PRINT" Ctrl+P....Print page
";
5210PRINT"
";
5220PRINT" Shift+f0...Red graphics
";
5230PRINT" Shift+f1...Green graphics
";
5240PRINT" Shift+f2...Yellow graphics
";
5250PRINT" Shift+f3...Blue graphics
";
5260PRINT" Shift+f4...Magenta graphic
s ";
5270PRINT" Shift+f5...Cyan graphics
";
5280PRINT" Shift+f6...White graphics
";
5290PRINT" Shift+f7...Black backgroun
d ";
5300PRINT" Shift+f8...Colour backgrou
nd ";
5310PRINT" Shift+f9...Pixel editor
";
5320PRINT"
";
5330PRINT" <Esc>...Save, Return to
View Mode ";
5340PRINT"
";
5350Q%=GET
5360IFQ%<>27:PROChelp5
5370H%=1:Q%=13
5380ENDPROC
5390:
5400REM "
5410REM " 0 1 2 3 4 5 6
5420DEFPROChelp5
5430PRINTTAB(0,7);
5440PRINT" NOTE PAD HELP 5
";
5450PRINT"
";
5460PRINT" Ctrl+C....Clear screen
";
5470PRINT" Ctrl+P....Print page
";
5480PRINT"
";
5490PRINT" Ctrl+f0...Contiguous grap
hics ";
5500PRINT" Ctrl+f1...Seperated graph
ics ";
5510PRINT" Ctrl+f2...Hold graphics
";
5520PRINT" Ctrl+f3...Release graphic
s ";
5530PRINT" Ctrl+f4...Double height
";
5540PRINT" Ctrl+f5...Single height
";
5550PRINT" Ctrl+f6...Insert space
";
5560PRINT" Ctrl+f7...Insert line
";
5570PRINT" Ctrl+f8...Delete line
";
5580PRINT" Ctrl+f9...Pixel editor
";
5590PRINT"
";
5600PRINT" <Esc>...Save, Return to
View Mode ";
5610PRINT"
";
5620Q%=GET
5630ENDPROC
5640:
5650DEFPROCoscli
5660CLS:PRINT"*";:INPUT""L$:OSCLIL$
5670PRINT'"Hit Any Key":Q%=GET:RUN
5680ENDPROC
5690:
5700DEFPROCinit
5710t%=0
5720B%=&900:W%=&9F0
5730T%=0:M%=0
5740REPEAT
5750M%=M%+1
5760$W%="Vol"+STR$(M%)
5770X%=W%MOD256
5780Y%=W%DIV256
5790A%=&C0:F%=(USR&FFCE)AND&FF
5800A%=0:Y%=0:CALL&FFCE
5810UNTILF%=0
5820M%=M%-1
5830ENDPROC
5840:
5850DEFPROCfinish
5860A%=0:Y%=0:CALL&FFCE
5870*FX4,0
5880*FX229,0
5890VDU23;10,&70;0;0;0
5900END
5910ENDPROC