home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 16
/
q16.d81
/
contdirprint
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
3KB
|
126 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)"
103 [153]"list (NULL)pecial version for (NULL)(NULL)atnstr$(NULL)(NULL)atn(NULL) 128open"
105 m[178]0:t[178]8
110 [129]i[178]0[164]3:[153][163]t)m$(i):[153]:[130]
120 [151]214,8[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 gosub600:sys52736,"t.content*",dv:rem 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-g*(qq=2)
322 print#4,w$(i);:ifqq=2thenprint#4:goto330
324 print#4,left$(sp$,42-len(w$(i)))w$(i+g+1)
330 next
335 ifggthenifqq=2thenprint#4,w$(h)
340 e=e(4):fori=0toe:print#4,chr$(d(4,i));:next:print#4:close4
350 goto100
400 print"[147]":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
600 poke214,17:print
610 print"[159] [201]f you are printing [204][207][193][196][211][212][193][210] 128 #1
620 [153]" through #8, press 1open. right$f #10 through
630 print" #16, press 2[159].
640 [161]a$:[139]a$[179]"1"[176]a$[177]"2"[167]640
650 qq[178][197](a$):[142]
1000 [159]15,dv,15,"i":[132]15,er,er$,a,a:[160]15
1010 [139]er[178]0[167][142]
1020 [153]" "er$" - lenheck your drive
1030 print" and press a key.
1040 [161]a$:[139]a$[178]""[167]1040
1050 [137]1000
10000 [159]15,8,15,"s0:contdirprint":[160]15:[148]"contdirprint",8:[128]
50000 q9$[178]"":u9[178]53280:[151]198,0
50010 [161]a$
50020 [151]646,[187](1)[172]15[170]1:[153]"tocmd";:[139]a$[178]""[167]50010
50030 [139]a$[178][199](13)[167][153]" ":[142]
50040 [139](a$[178][199](20)[175][195](q9$))[167]q9$[178][200](q9$,[195](q9$)[171]1):[137]50080
50050 [139][195](q9$)[177][178]20[167]t9%[178][194](u9):[151]u9,1:[151]u9,t9%:[137]50010
50060 [139]a$[179]" "[176](a$[177][199](127)[175]a$[179][199](160))[176]a$[178][199](34)[167]50010
50070 q9$[178]q9$[170]a$
50080 [153]""a$;:[137]50010