home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
120.PSU.BAS
< prev
next >
Wrap
BASIC Source File
|
1986-04-09
|
5KB
|
96 lines
1 '============================================PSU
2 '= FROM PCM MAGAZINE, PAGE 78, FEB. 1986 =
3 '= PRINTER SET UP UTILITY =
4 '= MARSHALL K. DUBOIS - 813-966-1252 =
5 '= 8926 PHYLISS AVENUE - SARASOTA, FL 33581 =
6 '============================================
7 'ALTHOUGH WRITTEN FOR A TANDY 1000/GEMINI 10X PRINTER, IT IS FOR MOST ANY COMPUTER
8 'USING MS-BASIC AND DOT MATRIX PRINTER, BY CHANGING FUNCTION LABELS 215-230
9 'AND SUBROUTINES 260-305,405-455 TO THE APPROPRIATE CONTROL CODES FOR YOUR PRINTER.
10 CLS:SCREEN 0,0,0:WIDTH 80:CR$=STRING$(78,32)
15 TB$=STRING$(28,223)+" PRINTER SET UP "+STRING$(28,223):GOTO 100
20 '===========================================PRIMARY INPUT ROUTINE
25 TM=Q:TC=1000
30 IN$=INKEY$:IF IN$<>""THEN RETURN ELSE TM=TM+1:IF TM=TC THEN 35 ELSE 30
35 IF TM<2000 THEN SOUND 555,55:TC=TC+1000:GOTO 30
40 CLS:WIDTH 40:SCREEN 0
45 SR$=STRING$(33,32)+"SCREEN PROTECTION..."+STRING$(25,32)+"TOUCH ANY KEY TO RESUME... "
50 IN$=INKEY$:IF IN$=""THEN GOSUB 55 ELSE CLS:WIDTH 80:PRINT TB$:GOTO 220
55 '===========================================SCROLL ROUTINE
60 I=1
65 LOCATE 12,1:PRINT MID$(SR$,I,30)
70 FOR J=1 TO 30:NEXT J
75 I=I+1
80 IF I<=LEN(SR$) THEN 65
85 GOTO 50
100 '==========================================SELECT MENU
105 GL$=STRING$(61,32):LP=6:CLS:PRINT TB$
110 GOSUB 405:GOSUB 415:GOTO 210
115 P1$="<1> STANDARD"
120 P2$="<2> PICA 10 CPI"
125 P3$="<3> ELITE 12 CPI"
130 P4$="<4> COMPRESSED 17 CPI"
135 P5$="<6> ITALIC"
140 P6$="<5> ELONGATED 5 CPI"
145 P7$="<7> EMPHASIZED"
150 P8$="<8> DOUBLE STRIKE"
155 P9$="<9> SUPER SCRIPT"
160 P0$="<0> SUB SCRIPT"
165 L3$="<L> SET LINES PER PAGE +"
170 E1$="<E> EXIT PROGRAM"
175 L1$="<1> 6 LPI (66 LINES/PG)"
180 L2$="<2> 8 LPI (88 LINES/PG)"
185 L4$="<3> EXIT TO PRINTER MENU"
190 RETURN
195 LOCATE 13,1:PRINT CR$:BEEP:LOCATE 13,28:SN=0:PRINT "ENTER SELECTION -> ";:GOSUB 20:SN=VAL(IN$):LOCATE 13,48:PRINT IN$:RETURN
200 CLS:SYSTEM
205 LOCATE 11,1:PRINT STRING$(78,223):RETURN
210 GOSUB 350
215 GOSUB 205:GOSUB 115
220 LOCATE 4,10:PRINT A$(1)P1$TAB(47)A$(7)P7$S1$;
225 LOCATE 5,10:PRINT A$(2)P2$TAB(47)A$(8)P8$S2$;:LOCATE 6,10:PRINT A$(3)P3$TAB(47)A$(9)P9$;:LOCATE 7,10:PRINT A$(4)P4$TAB(47)A$(0)P0$;:LOCATE 8,10:PRINT A$(6)P6$TAB(48)L3$;:LOCATE 9,10:PRINT A$(5)P5$TAB(48)E1$:LOCATE 11,1:PRINT STRING$(78,223)
230 LOCATE 23,25:PRINT "+ CURRENT LINES PER PAGE = "LP
235 GOSUB 195:LPRINT CHR$(7)
240 IF IN$="L" THEN SN=11 ELSE IF IN$="E" THEN SN=12 ELSE IF SN=0 THEN SN=10
245 ON SN GOTO 260,265,270,275,285,280,290,295,300,305,315,310
250 'SELECTION 1 2 3 4 5 6 7 8 9 0 L E
255 '=========================================SET NEW PRINTER CONDITIONS
260 LPRINT CHR$(27)CHR$(53);:GOSUB 410:GOTO 215
265 LPRINT CHR$(27)CHR$(64);:GOSUB 415:GOTO 215
270 LPRINT CHR$(27)CHR$(66)CHR$(2);:GOSUB 420:GOTO 215
275 LPRINT CHR$(27)CHR$(66)CHR$(3);:GOSUB 425:GOTO 215
280 LPRINT CHR$(27)CHR$(52);:GOSUB 430:GOTO 215
285 LPRINT CHR$(27)CHR$(87)CHR$(1);:GOSUB 435:GOTO 215
290 LPRINT CHR$(27)CHR$(64);:LPRINT CHR$(27)CHR$(69);:GOSUB 440:GOTO 215
295 LPRINT CHR$(27)CHR$(71);:GOSUB 445:GOTO 215
300 LPRINT CHR$(27)CHR$(83)CHR$(0);:GOSUB 450:GOTO 215
305 LPRINT CHR$(27)CHR$(83)CHR$(1);:GOSUB 455:GOTO 215
310 GOSUB 205:GOTO 200
315 CLS:PRINT TB$:GOSUB 205
320 LOCATE 4,26:PRINT L1$;:LOCATE 5,26:PRINT L2$;:LOCATE 6,26:PRINT L4$;:GOSUB 195
325 IF IN$="1" THEN LPRINT CHR$(27)CHR$(50):LP=66
330 IF IN$="2" THEN LPRINT CHR$(27)CHR$(48):LP=88
335 CLS:PRINT TB$:GOTO 220
350 '=======================================RESET PRINTER TO "POWER UP"
355 LPRINT CHR$(27)CHR$(18);
360 LPRINT CHR$(27)CHR$(53);
365 LPRINT CHR$(27)CHR$(87)CHR$(0);
370 LPRINT CHR$(27)CHR$(70);
375 LPRINT CHR$(27)CHR$(72);
380 LPRINT CHR$(27)CHR$(84);
385 LPRINT CHR$(27)CHR$(50);
390 LPRINT CHR$(27)CHR$(80);
395 LPRINT CHR$(27)CHR$(120)CHR$(0);:RETURN
400 '========================================MOVE "*" TO SHOW CURRENT STATUS
405 A$(1)="*":A$(2)=" ":A$(3)=" ":A$(4)=" ":A$(5)=" ":A$(6)=" ":A$(7)=" ":A$(8)=" ":A$(9)=" ":A$(0)=" ":S1$=" OFF":S2$=" OFF":RETURN
410 A$(1)="*":A$(5)=" ":RETURN
415 A$(2)="*":A$(9)=" ":A$(0)=" ":RETURN
420 A$(3)="*":A$(2)=" ":A$(4)=" ":A$(6)=" ":A$(9)=" ":A$(0)=" ":RETURN
425 A$(4)="*":A$(2)=" ":A$(3)=" ":A$(6)=" ":A$(9)=" ":A$(0)=" ":RETURN
430 A$(5)="*":A$(1)=" ":RETURN
435 A$(6)="*":A$(2)=" ":A$(3)=" ":A$(4)=" ":A$(9)=" ":A$(0)=" ":RETURN
440 A$(7)="*":A$(2)="*":A$(3)=" ":A$(4)=" ":A$(6)=" ":S1$=" ON":RETURN
445 A$(8)="*":S2$=" ON":RETURN
450 A$(9)="*":A$(2)=" ":A$(3)=" ":A$(4)=" ":A$(6)=" ":A$(0)=" ":S1$=" OFF":S2$=" ON":RETURN
455 A$(0)="*":A$(2)=" ":A$(3)=" ":A$(4)=" ":A$(6)=" ":A$(9)=" ":S1$=" OFF":S2$=" OFF":RETURN