home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 98
/
098.d81
/
contdirprint
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
123 lines
5 dv=peek(186):ifdv<8thendv=8
10 poke53281,0:poke53280,0:print"[147]"
15 gosub1000
20 sys57812"input a/d cc00",dv,0:poke780,0:poke781,0:poke782,204:sys65493
22 open15,dv,15,"r0:driver=driver":input#15,er,er$,a,a:close15
23 ifer<>63then30
24 open8,dv,8,"driver,p,r"
26 fori=0to5:input#8,e(i):e=e(i):forj=0toe
27 input#8,d(i,j)
28 next:next:close8
30 dimw$(300),f$(300):w=206*256:f=204*256
32 sp$=" "
34 h$="0123456789abcdef"
40 fori=0to3:readm$(i):next
42 data" [195]reate a printer driver "
43 data" [208]rint [195]ontents [211]heet "
44 data" [208]rint [196]irectory "
45 data" [209]uit the program "
50 fori=0to4:readp$(i):next
52 data" [211]ubscript [205]ode "
53 data" [197]lite [208]itch "
55 data" [195]ondensed [205]ode "
56 data" [204]ine [211]pacing 7/72 "
58 data" [210]eset [208]rinter "
100 print"[147][129] [212][200][197] [205][201][199][200][212][217] [204][207][193][196][211][212][193][210]
102 [153]" len(NULL)(NULL)(NULL)val(NULL)(NULL)(NULL) atn(NULL)str$ str$right$(NULL)vallen(NULL)(NULL)(NULL)(NULL) (NULL)(NULL)right$(NULL)(NULL)val(NULL)open"
105 m[178]0:t[178]8
110 [129]i[178]0[164]3:[153][163]t)m$(i):[153]:[130]
120 [151]214,6[170]m[172]2:[153]:[153][163]t)""m$(m)"on"
130 [161]a$:[139]a$[179][177]"on"[175]a$[179][177]""[175]a$[179][177][199](13)[167]130
140 [139]a$[178][199](13)[167]180
145 [153][163]t)"open"m$(m)
150 [139]a$[178]"on"[167]m[178]m[171]1:[139]m[179]0[167]m[178]3
160 [139]a$[178]""[167]m[178]m[170]1:[139]m[177]3[167]m[178]0
170 [137]120
180 [145]m[170]1[137]200,300,500,400
200 [153]"loadopen (NULL)ou will need your printer manual
202 print" in order to enter the following codes.
204 [153]" right$f you put a $ before the very first
206 print" entry, the program will expect the
208 [153]" numbers in left$val(NULL).
220 print"[154] [197][216][193][205][208][204][197]
225 [153]"open"p$(0)": 27 83 49 contor
227 print"[159]"p$(0)": $1b 53 49
230 [153]"cont valnter your printer's code for:
240 k=0:bb=0
250 poke214,16:print:print"[159]"p$(k)": ";:gosub50000:b$=q9$
252 ifleft$(b$,1)="$"orbb=1thenbb=1:goto280
255 j=0:fori=1tolen(b$)
256 ifmid$(b$,i,1)=" "thend(k,j)=val(c$):c$="":j=j+1:goto258
257 c$=c$+mid$(b$,i,1)
258 next:d(k,j)=val(c$):c$="":e(k)=j
259 k=k+1:ifk<5thenpoke781,17:sys59903:goto250
260 gosub1000:open8,dv,8,"@0:driver,p,w"
262 fori=0to5:e=e(i):print#8,e:forj=0toe
264 print#8,d(i,j)
266 next:next:close8
270 goto100
280 ifleft$(b$,1)="$"thenb$=right$(b$,len(b$)-1)
282 j=0:fori=1tolen(b$)step3:bb$=mid$(b$,i,1)
283 forl=1to16:ifbb$=mid$(h$,l,1)thenu=l-1:l=16
284 next
286 d(k,j)=16*u:bb$=mid$(b$,i+1,1)
287 forl=1to16:ifbb$=mid$(h$,l,1)thenu=l-1:l=16
288 next
290 d(k,j)=d(k,j)+u:j=j+1
292 next:goto259
300 sys52736,"t.content*",dv:w$(0)=right$(w$(0),len(w$(0))-2)
305 h=peek(252)*256+peek(251):g=int(h/2):gg=h-g*2
310 open4,4,7
312 fori=0to3:e=e(i):forj=0toe
314 print#4,chr$(d(i,j));
316 next:print#4
318 next
320 fori=0tog
322 print#4,w$(i);
324 print#4,left$(sp$,42-len(w$(i)))w$(i+g+1)
330 next
335 ifggthenprint#4,w$(h)
340 e=e(4):fori=0toe:print#4,chr$(d(4,i));:next:print#4:close4
350 goto100
400 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
410 ifer<>63thenprint"[147]":end
420 print"[147][144]load"chr$(34)"hello connect"chr$(34)",8"
430 print"run"
440 poke631,13:poke632,13:poke198,2:end
500 sys52224,"$:*",dv,0
505 h=peek(252)*256+peek(251)-1:g=int(h/4)
510 open4,4,7
512 fori=0to3:e=e(i):forj=0toe
514 print#4,chr$(d(i,j));
516 next:print#4
518 next
520 print#4,f$(0):print#4
522 fori=1tog+1
524 print#4,f$(i);
525 print#4,left$(sp$,20-len(f$(i)))f$(i+g+1);
526 print#4,left$(sp$,20-len(f$(i+g+1)))f$(i+2*g+2);
527 print#4,left$(sp$,20-len(f$(i+g*2+2)))f$(i+3*g+3)
530 next
535 open2,dv,0,"$:qw345":fori=0to33:get#2,a$:next
537 get#2,lb$:lb=asc(lb$+chr$(0)):get#2,hb$:hb=asc(hb$+chr$(0)):close2
538 print#4
539 print#4,hb*256+lb" blocks free"
540 e=e(4):fori=0toe:print#4,chr$(d(4,i));:next:print#4:close4
550 goto100
1000 open15,dv,15,"i":input#15,er,er$,a,a:close15
1010 ifer=0thenreturn
1020 print" "er$" - [195]heck your drive
1030 [153]" and press a key.
1040 geta$:ifa$=""then1040
1050 goto1000
10000 open15,8,15,"s0:contdirprint":close15:save"contdirprint",8:end
50000 q9$="":u9=53280:poke198,0
50010 geta$
50020 poke646,rnd(1)*15+1:print"[164][157]";:ifa$=""then50010
50030 ifa$=chr$(13)thenprint" ":return
50040 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto50080
50050 iflen(q9$)>=20thent9%=peek(u9):pokeu9,1:pokeu9,t9%:goto50010
50060 ifa$<" "or(a$>chr$(127)anda$<chr$(160))ora$=chr$(34)then50010
50070 q9$=q9$+a$
50080 print""a$;:goto50010