home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_22_1988_Transactor_Publishing.d64 / libeditor (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  2KB  |  73 lines

  1. 10 rem c-power library editor
  2. 20 rem
  3. 30 rem by eric giguere
  4. 40 rem
  5. 50 poke 53280, 14: poke 53281, 1
  6. 60 max = 200: dim fc$( max ), fl$( max )
  7. 70 nu$=chr$( 0 )
  8. 80 open 15,8,15
  9. 100 print chr$(14)"[147][195] [204]ibrary [205]aintenance -- by [197]ric [199]iguere";
  10. 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]"
  11. 120 print " [144][[193]]dd a function"
  12. 130 print " [[196]]elete a function"
  13. 140 print " [[204]]oad a library"
  14. 150 print " [[211]]ave the library"
  15. 160 print " [[209]]uit"
  16. 170 print " [[214]]iew the library"
  17. 180 print " [208]lease select: ";: gosub 1000: print c$: if c$="q" then end
  18. 190 if c$<>"l" then 350
  19. 200 print "[147] [204]ibrary name: ";: gosub 1010
  20. 210 lib$=left$( in$, 12 )+".l": n=0: a$=""
  21. 220 open 2,8,5, "0:"+lib$+",s,r"
  22. 230 gosub 1500: if e then 1550
  23. 240 print " loading ";lib$;"..."
  24. 250 get#2,b$: if b$<>"" and st=0 then a$=a$+b$: goto 250
  25. 260 if st<>0 then 300
  26. 270 n=n+1: fc$( n )=a$: a$=""
  27. 280 get#2,b$: if b$<>"" and st=0 then a$=a$+b$: goto 280
  28. 290 fl$( n )=a$: a$="": if st=0 then 250
  29. 300 close 2: goto 100
  30. 350 if c$<>"s" then 450
  31. 360 if n=0 then 100
  32. 370 print "[147] [193]re you sure? (y/n) ";: gosub 1000: if c$<>"y" then 100
  33. 380 print c$: print " [211]aving ";lib$;"..."
  34. 390 print#15,"s0:"+lib$
  35. 400 open 2,8,5,"0:"+lib$+",s,w": gosub 1500: if e then 1550
  36. 410 for i=1 to n
  37. 420 print#2,fc$( i );nu$;fl$( i );nu$;
  38. 430 next: close 2: goto 100
  39. 450 if c$<>"v" then 550
  40. 460 if n=0 then 100
  41. 470 print "[147] [198]unction        [198]ilename"
  42. 480 print " [184][184][184][184][184][184][184][184]        [184][184][184][184][184][184][184][184]"
  43. 490 for i=1 to n
  44. 500 print " ";fc$( i );tab( 17 );fl$( i )
  45. 510 wait 197,64: next
  46. 520 print " [208]ress a key... ";: gosub 1000: goto 100
  47. 550 if c$<>"a" then 650
  48. 560 if n=0 then 100
  49. 570 print "[147] [193]dd a function"
  50. 580 print " [198]unction name: ";: gosub 1010
  51. 590 n=n+1: fc$(n)=left$( in$, 8 )
  52. 600 print " [198]ilename: ";: gosub 1010
  53. 610 fl$( n )=left$( in$, 12 )+".obj"
  54. 620 goto 100
  55. 650 if c$<>"d" then 100
  56. 655 if n=0 then 100
  57. 660 print "[147] [196]elete a function"
  58. 670 print " [198]unction name: ";: gosub 1010
  59. 680 fc$=left$( in$, 8 ): j=0
  60. 690 for i=1 to n: if fc$=fc$( i ) then j=i: i=n+1
  61. 700 next: if j=0 then 100
  62. 710 if j=n then n=n-1: goto 100
  63. 720 for i=j+1 to n: fc$( i-1 )=fc$( i ): fl$(i-1)=fl$( i ): next: n=n-1
  64. 730 goto 100
  65. 999 end
  66. 1000 poke 198,0: poke 204, 0: wait 197,64,64: get c$: poke 204, 1: return
  67. 1010 open 1,0: input#1, in$: close1: print: return
  68. 1500 input#15,e,e$: if e<20 then e=0
  69. 1510 return
  70. 1550 print "[147] [196]isk error -- #";e
  71. 1560 print "                 ";e$
  72. 1570 close 2: close 15: end
  73.