home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_22_1988_Transactor_Publishing.d64
/
libeditor
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
2KB
|
73 lines
10 rem c-power library editor
20 rem
30 rem by eric giguere
40 rem
50 poke 53280, 14: poke 53281, 1
60 max = 200: dim fc$( max ), fl$( max )
70 nu$=chr$( 0 )
80 open 15,8,15
100 print chr$(14)"[147][195] [204]ibrary [205]aintenance -- by [197]ric [199]iguere";
110 print "[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
120 print " [144][[193]]dd a function"
130 print " [[196]]elete a function"
140 print " [[204]]oad a library"
150 print " [[211]]ave the library"
160 print " [[209]]uit"
170 print " [[214]]iew the library"
180 print " [208]lease select: ";: gosub 1000: print c$: if c$="q" then end
190 if c$<>"l" then 350
200 print "[147] [204]ibrary name: ";: gosub 1010
210 lib$=left$( in$, 12 )+".l": n=0: a$=""
220 open 2,8,5, "0:"+lib$+",s,r"
230 gosub 1500: if e then 1550
240 print " loading ";lib$;"..."
250 get#2,b$: if b$<>"" and st=0 then a$=a$+b$: goto 250
260 if st<>0 then 300
270 n=n+1: fc$( n )=a$: a$=""
280 get#2,b$: if b$<>"" and st=0 then a$=a$+b$: goto 280
290 fl$( n )=a$: a$="": if st=0 then 250
300 close 2: goto 100
350 if c$<>"s" then 450
360 if n=0 then 100
370 print "[147] [193]re you sure? (y/n) ";: gosub 1000: if c$<>"y" then 100
380 print c$: print " [211]aving ";lib$;"..."
390 print#15,"s0:"+lib$
400 open 2,8,5,"0:"+lib$+",s,w": gosub 1500: if e then 1550
410 for i=1 to n
420 print#2,fc$( i );nu$;fl$( i );nu$;
430 next: close 2: goto 100
450 if c$<>"v" then 550
460 if n=0 then 100
470 print "[147] [198]unction [198]ilename"
480 print " [184][184][184][184][184][184][184][184] [184][184][184][184][184][184][184][184]"
490 for i=1 to n
500 print " ";fc$( i );tab( 17 );fl$( i )
510 wait 197,64: next
520 print " [208]ress a key... ";: gosub 1000: goto 100
550 if c$<>"a" then 650
560 if n=0 then 100
570 print "[147] [193]dd a function"
580 print " [198]unction name: ";: gosub 1010
590 n=n+1: fc$(n)=left$( in$, 8 )
600 print " [198]ilename: ";: gosub 1010
610 fl$( n )=left$( in$, 12 )+".obj"
620 goto 100
650 if c$<>"d" then 100
655 if n=0 then 100
660 print "[147] [196]elete a function"
670 print " [198]unction name: ";: gosub 1010
680 fc$=left$( in$, 8 ): j=0
690 for i=1 to n: if fc$=fc$( i ) then j=i: i=n+1
700 next: if j=0 then 100
710 if j=n then n=n-1: goto 100
720 for i=j+1 to n: fc$( i-1 )=fc$( i ): fl$(i-1)=fl$( i ): next: n=n-1
730 goto 100
999 end
1000 poke 198,0: poke 204, 0: wait 197,64,64: get c$: poke 204, 1: return
1010 open 1,0: input#1, in$: close1: print: return
1500 input#15,e,e$: if e<20 then e=0
1510 return
1550 print "[147] [196]isk error -- #";e
1560 print " ";e$
1570 close 2: close 15: end