home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 4 #11
/
Commodore_Disk_User_Vol.4_11_1991_-.d64
/
editor_scroller
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
5KB
|
185 lines
10 if zz=0thenzz=1:load"mc code",8,1
100 ifdv<>0then231
101 poke52,31:poke56,31:clr
102 poke53281,6:print"[147]";:poke53280,1:poke53281,1:print"";:h=14736:c1=0:c2=0
103 fori=0to7:poke10240+(i*3),255:poke10241+(3*i),0:poke10242+(3*i),0:next
104 fori=10263to10303:pokei,0:next:poke53287,0:poke53275,1
105 poke53249,50:poke53248,24
106 sp=1:fr=1:br=0:fori=0to7:poke13680+i,0:poke13808+i,0:poke12656+i,0
107 poke12784+i,0:next:fori=0to3:poke13682+i,3:poke13810+i,192:next
108 poke53269,1:sys8192:poke2040,160
109 poke53248,24+(8*c2):poke53249,50+(8*c1)
110 geta$:ifa$=""then110
111 k=0:ifa$="*"then125
112 ifa$="_"then182
113 ifa$=""thenc2=c2+1:ifc2>16thenc2=16
114 ifa$=chr$(20)thenc2=c2-1:ifc2<0thenc2=0
115 ifa$=""thengosub163
116 ifa$="[145]"thengosub169
117 ifa$=chr$(13)thengosub175
118 ifa$="."ora$=" "ora$="-"thenk=1
119 if(a$>="0"anda$<="9")thenk=1
120 if(a$>="a"anda$<="z")thenk=1
121 ifk=0then109
122 a=asc(a$)and191:poke1024+(c1*40)+c2,a:poke55296+(c1*40)+c2,6
123 c2=c2+1:ifc2>16thenc2=16
124 goto109
125 rem
126 sys8204:poke53269,0
127 print"[147]":printtab(13);"display title":printtab(12);"----------------"
128 print:print"speed [144]02":poke198,0
129 poke1191,sp+49
130 geta$:ifa$=chr$(13)then133
131 ifa$=""thenpoke198,0:sp=(sp+1)and1:poke1191,sp+49
132 goto130
133 print:print"foreground colour (ink) [144]01"
134 poke198,0
135 iffr<10thenpoke1288,48:poke1289,fr+48
136 iffr>10thenpoke1288,49:poke1289,fr+38
137 geta$:ifa$=chr$(13)then142
138 ifa$<>""then137
139 poke198,0:fr=(fr+1)and15:iffr<10thenpoke1288,48:poke1289,fr+48
140 iffr>9thenpoke1288,49:poke1289,fr+38
141 goto137
142 print:print"background colour (paper) [144]00"
143 poke198,0
144 ifbr<10thenpoke1370,48:poke1371,br+48
145 ifbr>10thenpoke1370,49:poke1371,br+38
146 geta$:ifa$=chr$(13)then151
147 ifa$<>""then146
148 poke198,0:br=(br+1)and15:ifbr<10thenpoke1370,48:poke1371,br+48
149 ifbr>9thenpoke1370,49:poke1371,br+38
150 goto146
151 poke254,sp:poke8211,fr:poke8225,br
152 poke53272,28:sys8201:poke53272,21
153 poke53280,1:poke53281,1
154 print"[147]a] re-enter titles"
155 print"b] re-roll titles"
156 print"choose [a/b]":poke198,0
157 geta$:ifa$=""then157
158 ifa$="b"then127
159 ifa$<>"a"then157
160 poke53281,6:print"[147]";:poke53281,1:print"";
161 sys8207:poke53280,1:sys8198
162 poke53269,1:goto109
163 rem
164 c2=0:c1=c1+1:ifc1<25thenreturn
165 c1=24:ifh>39976thenreturn
166 sys59626:a=20-peek(h+1000):fori=1toa
167 poke1983+i,peek(h+1000+(2*i)):next:sys8198
168 h=h+40:return
169 rem
170 c2=0:c1=c1-1:ifc1>=0thenreturn
171 c1=0:ifh-40<14736thenreturn
172 sys8195:h=h-40:a=peek(h)
173 fori=0to16:poke1024+i,32:next
174 fori=1to(20-a):poke1023+i,peek(h+(i*2)):next:sys8198:return
175 rem
176 b=h+(c1*40):pokeb,20-c2:ifc2=0thenpokeb,19:pokeb+2,32:goto181
177 fori=1toc2:a=peek(1023+(c1*40)+i)
178 pokeh+(c1*40)+(i*2),a:next
179 fori=c2to16:poke1024+i+(c1*40),32:next
180 goto163
181 fori=0to16:poke1024+(c1*40)+i,32:next:goto163
182 sys8204:poke53269,0:poke198,0
183 print"[147]input/output"
184 print"------------"
185 print:print"1] load title data"
186 print:print"2] save title data"
187 print:print"3] create a demo title"
188 print:print"_] abort i/o and return to edit screen"
189 print:print:print"make your choice please"
190 geta$:ifa$=""then190
191 ifa$="_"andh2=26thenpoke198,0:goto231
192 ifa$="_"thenpoke53269,1:print"[147]";:sys8198:sys8207:poke198,0:goto109
193 ifa$="1"then215
194 ifa$="2"then197
195 ifa$="3"then235
196 goto190
197 poke198,0:ifdv>7thendv=0
198 print"[147]save title data"
199 print"---------------"
200 h1=h+(c1*40):h2=int(h1/256):h1=h1-(h2*256)
201 gosub251
202 gosub266
203 print
204 print"set your ";:ifdv=1thenprint"[144]tape"
205 ifdv<>1thenprint"[144]disk drive"
206 print:print"and press 'return'"
207 print:print"to save your title data"
208 print:print"with the name - [144]";fl$
209 poke198,0
210 geta$:ifa$<>chr$(13)then210
211 poke198,0:sys57812fl$,dv,1
212 poke251,0:poke252,57
213 poke780,251:poke781,h1:poke782,h2:sys65496
214 goto183
215 poke198,0:ifdv>7thendv=0
216 print"[147]load title data"
217 print"---------------"
218 gosub251
219 gosub266
220 print
221 print"set your ";:ifdv=1thenprint"[144]tape"
222 ifdv<>1thenprint"[144]disk drive"
223 print:print"and press 'return'"
224 print:print"to load your title data"
225 print:print"with the name - [144]";fl$
226 poke198,0
227 geta$:ifa$<>chr$(13)then227
228 poke198,0:sys8192
229 loadfl$,dv,1
230 h2=26:goto183
231 print"[147]":sys8198:h=14736:fori=0to24
232 h1=20-peek(h+(i*40)):forj=1toh1
233 poke1023+(i*40)+j,peek(h+(i*40)+(j*2)):nextj,i
234 poke53269,1:c1=0:c2=0:goto109
235 print"[147][129]create demo"
236 print"-----------"
237 ifdv>7thendv=0
238 gosub251:gosub266
239 h1=h+(c1*40):h2=int(h1/256):h1=h1-(h2*256):poke8709,h1:poke8713,h2
240 print:print"[129]set your ";:ifdv=1thenprint"[144]tape"
241 ifdv<>1thenprint"[144]disk drive"
242 print:print"[129]and press 'return'"
243 print:print"to save your title demo"
244 print:print"with the name - [144]";fl$
245 poke198,0:poke8734,h2
246 geta$:ifa$<>chr$(13)then246
247 poke198,0:sys57812fl$,dv,0
248 poke251,1:poke252,31:poke780,251:poke781,h1:poke782,h2:poke12287,sp
249 sys65496:poke8709,0:poke8713,56:poke8734,56
250 goto183
251 print"which device ? ";
252 ifdv=1thenprint"[144]tape"
253 ifdv=0thenprint"[144]disk"
254 geta$:ifa$=chr$(13)then257
255 ifa$<>""then254
256 poke198,0:dv=(dv+1)and1:goto251
257 ifdv=1then265
258 print"which device number ? ";:poke198,0
259 ifdn=0thenprint"[144]8"
260 ifdn=1thenprint"[144]9"
261 geta$:ifa$=chr$(13)then264
262 ifa$<>""then261
263 poke198,0:dn=(dn+1)and1:goto258
264 dv=8+dn
265 return
266 fl$="":poke53248,160:poke53249,114:poke53269,1
267 print" "
268 print"enter filename - [144]";fl$:poke53248,160+(len(fl$)*8)
269 er=1
270 geta$:ifa$=""then270
271 if(a$>="a")and(a$<="z")thener=0
272 if(a$>="0")and(a$<="z")thener=0
273 ifa$=chr$(13)then281
274 ifa$=chr$(20)then278
275 iferthen270
276 iflen(fl$)<11thenfl$=fl$+a$:goto267
277 iflen(fl$)=11then269
278 iflen(fl$)=0then269
279 iflen(fl$)=1thenfl$="":goto267
280 fl$=left$(fl$,(len(fl$)-1)):goto267
281 iflen(fl$)=0then269
282 poke53269,0:return