home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
prt
/
prnmod.ba
< prev
next >
Wrap
Text File
|
2006-10-19
|
5KB
|
112 lines
0 'CLUB 100 Library, Modem 415-939-1246
1 'PRNMOD.BA by Jim Irwin
10 I=59900:CLEAR256,I:I=HIMEM:J=59960 ' I is for CTRL codes, J is for Fonts
11 CLS:PRINT:PRINT"[S]tatus":PRINT"[C]trl Codes":PRINT"[F]onts":PRINT"[E]nd"
12 A$=INPUT$(1):IFA$="E"ORA$="e"THENMENU
13 IFA$="S"ORA$="s"THEN16
14 IFA$="C"ORA$="c"THEN40
15 IFA$="F"ORA$="f"THEN70ELSE11
16 GOSUB98:GOSUB110:IFPEEK(I)<255THENCLS:JC=0:IC=I:GOTO19
17 POKEI+1,255:POKEI+2,255
18 PRINT"No Control Characters Stored":JC=JC+1:GOTO31
19 I$="^"+CHR$(PEEK(IC)+64):PRINT@JC*40,I$;"+ ";:IC=IC+1
20 IFPEEK(IC)=255THENPRINT"No Code"
21 IFPEEK(IC)=255THEN24
22 PRINTMID$(STR$(PEEK(IC)),2);:IC=IC+1:IF PEEK(IC)<255 THENPRINT",";
23 GOTO21
24 PRINT@JC*40+20,I$;"- ";:IC=IC+1
25 IFPEEK(IC)=255THENPRINT"No Code"
26 IFPEEK(IC)=255THEN29
27 PRINTMID$(STR$(PEEK(IC)),2);:IC=IC+1:IFPEEK(IC)<255THENPRINT",";
28 GOTO26
29 JC=JC+1:IFJC=8THENJC=0:A$=INPUT$(1):CLS
30 IC=IC+1:IFPEEK(IC)=255THEN31ELSE19
31 IC=J:IFPEEK(IC)<255THEN33
32 POKEIC+1,255:PRINT@JC*40,"No Fonts Stored":GOTO39
33 PRINT@JC*40,"Font";STR$(PEEK(IC));": ";:IC=IC+1
34 IFPEEK(IC)=255THENPRINT"No Font":GOTO37
35 IFPEEK(IC)=255THEN37
36 PRINTMID$(STR$(PEEK(IC)),2);:IC=IC+1:IFPEEK(IC)<255THENPRINT",";:GOTO36
37 JC=JC+1:IC=IC+1:IFJC=8THENJC=0:A$=INPUT$(1):CLS
38 IFPEEK(IC)<255THEN33
39 A$=INPUT$(1):GOTO11
40 C$="CIJMPWXYZ":IC=I
41 B=INT(I/256):A=I-256*B:POKE61835,A:POKE61836,B
42 CLS:PRINT"Control Codes are in decimal, with val-"
43 PRINT"ues separated by commas. (Ex: 27,45,1)";
44 PRINT"Just press ENTER at the + or - prompt if";
45 PRINT"you want a null code."
46 PRINT@203,"Control Letter: ";:LINEINPUTA$
47 A=ASC(A$):IFA>90THENA=A-32
48 B=INSTR(1,C$,CHR$(A)):IFB>0ORA<65ORA>90THEN49ELSE50
49 PRINT@240,CHR$(27);"p^";CHR$(A);" is not allowed";CHR$(27);"q":GOTO46
50 PRINT"^";CHR$(A);"+ Ctrl Sequence: ";:LINEINPUTL$(1)
51 PRINT"^";CHR$(A);"- Ctrl Sequence: ";:LINEINPUTL$(2)
52 POKEIC,A-64:GOSUB62:FORK=1TO2:IFL$(K)=""THEN56
53 A=VAL(L$(K)):POKEIC,A:GOSUB62
54 B=INSTR(1,L$(K),","):IFB=0THEN56
55 L$(K)=MID$(L$(K),B+1):GOTO53
56 POKEIC,255:GOSUB62
57 NEXT
58 PRINT"Done? (Y/N) ";:LINEINPUTA$
59 IFA$="Y"ORA$="y"THEN61
60 IFA$="N"ORA$="n"THEN42ELSE58
61 POKEIC,255:GOTO11
62 IC=IC+1:IFIC<JTHENRETURN
63 FORK=0TO2:POKEI+K,255:NEXT
64 CLS:PRINT"Your CTRL sequences are going to over-"
65 PRINT"write your Font sequences. Your input"
66 PRINT"has been lost and PRINT.CO now has NO"
67 PRINT"CTRL codes stored. (Sorry!) Edit line"
68 PRINT"20 and change I=XXXXX to a lower value."
69 END
70 JC=J:B=INT(J/256):A=J-256*B:POKE60228,A:POKE60229,B
71 CLS:PRINT"Font Codes are any decimal from 1-254."
72 PRINT"Font Sequences are in decimal, with val-";
73 PRINT"ues separated by commas. (Ex: 27,31,9)"
74 PRINT@208,"Font Code";:CALL16989:INPUTA
75 IFA<1ORA>254THEN76ELSE77
76 PRINTCHR$(27);"pFont";STR$(A);" is not allowed";CHR$(27);"q":GOTO74
77 PRINTUSING"Font ### Sequence: ";A;:CALL16989:LINEINPUTK$
78 POKEJC,A:GOSUB88
79 IFK$=""THEN83
80 A=VAL(K$):POKEJC,A:GOSUB88
81 B=INSTR(1,K$,","):IFB=0THEN83
82 K$=MID$(K$,B+1):GOTO80
83 POKEJC,255:GOSUB88
84 PRINT"Done? (Y/N) ";:LINEINPUTA$
85 IFA$="Y"ORA$="y"THEN87
86 IFA$="N"ORA$="n"THEN71ELSE84
87 POKEJC,255:GOTO11
88 JC=JC+1:IFJC<60000THENRETURN
89 GOSUB98:CLS:PRINT"Your Font sequences are about to over-"
90 PRINT"write the PRINT program. Your input has";
91 PRINT"been lost and PRINT.CO now has NO Fonts"
92 PRINT"stored (sorry). Edit line 20 and change";
93 PRINT"J=XXXXX to a lower value. Your CTRL"
94 PRINT"sequences extend to";
95 PRINTSTR$(K);". J must be"
96 PRINT"greater than that! Press any key to end.";
97 A$=INPUT$(1):END
98 IK=0:FORK=ITOJ:IFK=IANDPEEK(K)=255THENK=K+2:RETURN
99 IFPEEK(K)<255THEN102
100 IFIK=0THENIK=1:GOTO102
101 IFPEEK(K+1)=255THENK=K+1:RETURN
102 NEXT:
103 CLS:PRINT"End of CTRL sequences is past the start"
104 PRINT"of the Font sequences. This program"
105 PRINT"won't change any of your stored data,"
106 PRINT"but something is wrong. Either use this";
107 PRINT"program to enter new codes, or PEEK at"
108 PRINT"the code tables."
109 END
110 FORK=JTO60000:IFPEEK(K)=255ANDPEEK(K+1)=255THENK=K+1:RETURN
111 NEXT
112 CLS:PRINT"End of Font sequences is past the start"
113 PRINT"of the PRINT program. This program"
114 PRINT"won't change any of your stored data,"
115 PRINT"but something is wrong. Either use this";
116 PRINT"program to enter new codes, or PEEK at"
117 PRINT"the code tables."
118 END