home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 179
/
179.d81
/
headercolor
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
69 lines
10 poke53281,0:poke53280,0:print"[147]":poke53371,0
20 dv=peek(186):ifdv<8thendv=8
30 dimc(16):fori=0to15:readc(i):next
40 data144,5,28,159,156,30,31,158,129,149,150,151,152,153,154,155
50 h$=chr$(141)+chr$(145)
60 print"[147][129] [212][200][197] [205][201][199][200][212][217] [204][207][193][196][211][212][193][210] [200][197][193][196][197][210] [195][207][204][207][210][201][218][197][210]"
70 print"[155] by [203]nees [195]alhoon
80 [153]" cont(1cont) ascormat a 1541 disk with a colored
90 print" header.
100 [153]" (2cont) lenhange the header name and color
110 print" on a formatted disk without
120 [153]" re-formatting it.
130 poke198,0
140 geta$:ifa$<"1"ora$>"2"then140
150 m=1:ifa$="2"thenm=2
160 gosub630
170 fori=3to19:poke781,i:sys59903:next
180 print""
190 poke19,65:print"":input"[155][195]olor of header: ";c1
200 print"":input"[155][195]olor of files: ";c2
210 print"":input"[155][200]eader name (12 max.): ";hn$
220 iflen(hn$)>12thenprint"[145][145][145]":goto210
230 poke19,0:print
240 ifm=2then380
250 print:input"[155][201][196] ([197]nter nothing for short[206][197][215])";id$
260 iflen(id$)>2thenprint"[145][145][145]":goto250
270 print"[154] [201]nsert disk to be formatted in
280 [153]" drivesys"dv"contand press (NULL)(NULL)atnlenval.
290 poke198,0
300 geta$:ifa$=""then300
310 nn$=h$+chr$(c(c1))+hn$+chr$(c(c2))
320 ifid$<>""thennn$=nn$+","+id$
330 open15,dv,15,"n0:"+nn$:close15
340 print"[158][196]one!"
350 tq=ti
360 ifti<tq+200then360
370 goto60
380 print"[154] [201]nsert disk to be renamed in
390 [153]" drivesys"dv"contand press (NULL)(NULL)atnlenval.
400 poke198,0
410 geta$:ifa$<>" "then410
420 nn$=h$+chr$(c(c1))+hn$+chr$(c(c2))
430 iflen(nn$)<16thennn$=nn$+chr$(160):goto430
440 open15,dv,15,"i0"
450 open1,dv,5,"#"
460 print#15,"u1:5 0 18 0"
470 print#15,"b-p:5 144"
480 od$="":fori=1to16:get#1,a$:ifa$=""thena$=chr$(0)
490 od$=od$+a$:next
500 print"[154][207]ld name: "od$
510 print#15,"b-p:5 144"
520 print#1,nn$;
530 print#15,"u2:5 0 18 0"
540 print#15,"i0"
550 close1:close15
560 print"[154][206]ew name: "mid$(nn$,3,len(nn$)-3)
570 print"[158][196]one!"
580 print" [154](1[154]) [193]nother (2[154]) [209]uit
590 [161]a$:[139]a$[179]"1"[176]a$[177]"2"[167]590
600 [139]a$[178]"1"[167]60
610 [153]"loadopen":[128]
630 [151]214,20:[153]
640 [153]"0 print#peeklack 4 print#(NULL)urple 8 print#(NULL)range 12print# chr$rey 2
650 print"1 [152][215]hite 5 [152][199]reen 9 [152][194]rown 13[152] [204]t. [199]rn
660 [153]"2 print#(NULL)ed 6 print#peeklue 10 print#(NULL)t. (NULL)ed 14print# (NULL)t.peeklue
670 print"3 [152][195]yan 7 [152][217]ellow 11 [152][199]rey 1 15[152] [199]rey 3"
680 return
10000 d=peek(186):n$="0:headercolor":open15,d,15,"s"+n$:close15:saven$,d:end