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