8-Bit Software Online Conversion
Printer Driver - Listing
10DEFFNS="ProgPrt":REM By C.J.Richard
son For 8-Bit Software.
20MODE128
30PRINT"Program an Epson Stylus 400.
ENTER 2 DIGIT CODE FOR PRINTER CODE."
40PRINT'" 01. Initialise Printer.
29. Condensed."
50PRINT" 02. Unidirectional on.
30. Cancel Condensed."
60PRINT" 03. Unidirectional off.
31. Double Width."
70PRINT" 04. 1/8 Linespace.
32. Cancel Double Width."
80PRINT" 05. 1/6 Linespace.
33. Double Height."
90PRINT" 06. n/180 Linespace.
34. Cancel Double Height."
100PRINT" 07. n/360 Linespace.
35. Double Strike."
110PRINT" 08. Pagelength by lines.
36. Cancel Double Strike."
120PRINT" 09. Pagelength by inches.
37. Superscript."
130PRINT" 10. Left Margin.
38. Subscript."
140PRINT" 11. Right Margin.
39. Cancel Super/Sub Script."
150PRINT" 12. Roman.
40. Underline Fancy."
160PRINT" 13. Sans Serif.
41. Underline On."
170PRINT" 14. Courier.
42. Underline Off."
180PRINT" 15. Prestige.
43. Normal Character."
190PRINT" 16. Roman T.
44. Outline."
200PRINT" 17. Sans Serif H.
45. Shadow."
210PRINT" 18. Font by pitch+point.
46. Outline With Shadow."
220PRINT" 19. 10 cpi.
47. Proportional on."
230PRINT" 20. 12 cpi.
48. Proportional off."
240PRINT" 21. 15 cpi.
49. "
250PRINT" 22. Inter Character Space.
50. "
260PRINT" 23. Draft.
51. "
270PRINT" 24. LQ.
52. Test Print. (This is a test)."
280PRINT" 25. Italic.
53. Input Text. Finish With ZZZ."
290PRINT" 26. Italic off."
300PRINT" 27. Bold."
310PRINT" 28. Cancel Bold."
320REPEAT
330*FX21
340PRINTTAB(0,30);
350A$=""
360A$=GET$
370PRINTA$;
380A$=A$+GET$
390PRINTRIGHT$(A$,1)
400B%=VAL A$
410IF B%>0 IF B%<29 PRINTTAB(0,B%+1)">
"
420IF B%>28 IF B%<54 IF B%<>52 IF B%<>
53 PRINTTAB(34,B%-27)">"
430IF B%=1:VDU2,1,27,1,64,3:RUN
440IF B%=2:VDU2,1,27,1,85,1,1,3:VDU31,
0,4,32
450IF B%=3:VDU2,1,27,1,85,1,0,3:VDU31,
0,3,32
460IF B%=4:VDU2,1,27,1,48,3:VDU31,0,6,
32,10,8,32,10,8,32
470IF B%=5:VDU2,1,27,1,50,3:VDU31,0,5,
32,10,10,8,32,10,8,32
480IF B%=6:PROCget("180th linespace ")
:VDU2,1,27,1,51,1,A%,3:VDU31,0,5,32,10,8
,32,10,10,8,32:PRINTTAB(24,7);STR$A%;"
";
490IF B%=7:PROCget("360th linespace ")
:VDU2,1,27,1,43,1,A%,3:VDU31,0,5,32,10,8
,32,10,8,32:PRINTTAB(24,8);STR$A%;" ";
500IF B%=8:PROCget("Number of Lines ")
:VDU2,1,27,1,67,1,A%,3:PRINTTAB(27,9);ST
R$A%;" ";
510IF B%=9:PROCget("Inches "):VDU2,1,2
7,1,67,1,0,1,A%,3:PRINTTAB(27,10);STR$A%
;" ";
520IF B%=10:PROCget("Margin "):VDU2,1,
27,1,108,1,A%,3:PRINTTAB(25,11);STR$A%;"
";
530IF B%=11:PROCget("Margin "):VDU2,1,
27,1,81,1,A%,3:PRINTTAB(25,12);STR$A%;"
";
540IF B%=12:VDU2,1,27,1,107,1,0,3:VDU3
1,0,14,32,10,8,32,10,8,32,10,8,32,10,8,3
2
550IF B%=13:VDU2,1,27,1,107,1,1,3:VDU3
1,0,13,32,10,10,8,32,10,8,32,10,8,32,10,
8,32
560IF B%=14:VDU2,1,27,1,107,1,2,3:VDU3
1,0,13,32,10,8,32,10,10,8,32,10,8,32,10,
8,32
570IF B%=15:VDU2,1,27,1,107,1,3,3:VDU3
1,0,13,32,10,8,32,10,8,32,10,10,8,32,10,
8,32
580IF B%=16:VDU2,1,27,1,107,1,10,3:VDU
31,0,13,32,10,8,32,10,8,32,10,8,32,10,10
,8,32
590IF B%=17:VDU2,1,27,1,107,1,11,3:VDU
31,0,13,32,10,8,32,10,8,32,10,8,32,10,8,
32
600IF B%=18:PROCget("Pitch 0 1 18 21 2
4 30 36 42 48 60 OR 64 "):C%=A%
610IF B%=18:PROCget("Point 0 16 21 24
28 32 36 40 44 48 52 56 60 OR 64 "):D%=A
%
620IF B%=18:VDU2,1,27,1,88,1,C%,1,D%,1
,0,1,27,1,51,1,D%*1.5,3:PRINTTAB(26,19);
STR$C%;" ";STR$D%;" ";TAB(24,7);STR$(D%
*1.5);" ";:VDU31,0,20,32,10,8,32,10,8,3
2,10,8,32
630IF B%=19:VDU2,1,27,1,80,3:VDU31,0,1
9,32,10,10,8,32,10,8,32,10,8,32
640IF B%=20:VDU2,1,27,1,77,3:VDU31,0,1
9,32,10,8,32,10,10,8,32,10,8,32
650IF B%=21:VDU2,1,27,1,103,3:VDU31,0,
19,32,10,8,32,10,8,32,10,10,8,32
660IF B%=22:PROCget("Number of units 1
/120-Draft 1/180-LQ"):VDU2,1,27,1,32,1,A
%,3:PRINTTAB(28,23);STR$A%;" ";
670IF B%=23:VDU2,1,27,1,120,1,0,3:VDU3
1,0,25,32
680IF B%=24:VDU2,1,27,1,120,1,1,3:VDU3
1,0,24,32
690IF B%=25:VDU2,1,27,1,52,3:VDU31,0,2
7,32
700IF B%=26:VDU2,1,27,1,53,3:VDU31,0,2
6,32
710IF B%=27:VDU2,1,27,1,69,3:VDU31,0,2
9,32
720IF B%=28:VDU2,1,27,1,70,3:VDU31,0,2
8,32
730IF B%=29:VDU2,1,15,3:VDU31,34,3,32
740IF B%=30:VDU2,1,18,3:VDU31,34,2,32
750IF B%=31:VDU2,1,27,1,87,1,1,3:VDU31
,34,5,32
760IF B%=32:VDU2,1,27,1,87,1,0,3:VDU31
,34,4,32
770IF B%=33:VDU2,1,27,1,119,1,1,3:VDU3
1,34,7,32
780IF B%=34:VDU2,1,27,1,119,1,0,3:VDU3
1,34,6,32
790IF B%=35:VDU2,1,27,1,71,3:VDU31,34,
9,32
800IF B%=36:VDU2,1,27,1,72,3:VDU31,34,
8,32
810IF B%=37:VDU2,1,27,1,83,1,0,3:VDU31
,34,11,32,10,8,32
820IF B%=38:VDU2,1,27,1,83,1,1,3:VDU31
,34,10,32,10,10,8,32
830IF B%=39:VDU2,1,27,1,84,3:VDU31,34,
10,32,10,8,32
840IF B%=40:PROCget("1 Under 2 Throug
h 3 Over "):D%=A%
850IF B%=40:PROCget("0-Cancel 1-Sing C
ont 2-Doub Cont 5-Sing Broken 6-Doub Br
oken "):E%=A%
860IF B%=40:VDU2,1,27,1,40,1,45,1,3,1,
0,1,1,1,D%,1,E%,3:PRINTTAB(60,13);STR$D%
;" ";STR$E%;" ";
870IF B%=41:VDU2,1,27,1,45,1,1,3:VDU31
,34,15,32
880IF B%=42:VDU2,1,27,1,45,1,0,3:VDU31
,34,14,32
890IF B%=43:VDU2,1,27,1,113,1,0,3:VDU3
1,34,17,32,10,8,32,10,8,32
900IF B%=44:VDU2,1,27,1,113,1,1,3:VDU3
1,34,16,32,10,10,8,32,10,8,32
910IF B%=45:VDU2,1,27,1,113,1,2,3:VDU3
1,34,16,32,10,8,32,10,10,8,32
920IF B%=46:VDU2,1,27,1,113,1,3,3:VDU3
1,34,16,32,10,8,32,10,8,32
930IF B%=47:VDU2,1,27,1,112,1,1,3:VDU3
1,34,21,32
940IF B%=48:VDU2,1,27,1,112,1,0,3:VDU3
1,34,20,32
950IF B%=52:VDU2:PRINTTAB(0,30);"This
is a test printout.":VDU3
960IF B%=53:PROCtext
970PRINTTAB(0,30);SPC75;TAB(0,30);
980UNTILFALSE
990END
1000DEFPROCget(B$)
1010PRINTTAB(0,30);SPC(79);TAB(0,30);B$
;
1020INPUTA%
1030ENDPROC
1040DEFPROCtext
1050REPEAT
1060PRINTTAB(0,30);SPC79;TAB(0,30);
1070INPUT B$
1080IF B$<>"ZZZ" FORL%=1TOLENB$:VDU2,1,
ASC(MID$(B$,L%,1)),3:NEXT:VDU2,1,13,3
1090UNTILB$="ZZZ"
1100PRINTTAB(0,30);"ZZZ";
1110ENDPROC