home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 5 / 64er_Magazin_Sonderheft_05_86-05_1986_Markt__Technik_de.d64 / directorysort (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  89 lines

  1. 100 goto200
  2. 110 input#1,f1,f$,f2,f3:iff1=0thenreturn
  3. 120 printf1;f$,f2;f3:end
  4. 130 ifno+en>=cthenreturn
  5. 131 sys53056,0,2,2,23,18:no=no+1
  6. 135 poke214,23:poke211,2:sys58732:printna$(zu(no+en-1));:return
  7. 140 ifno=0thenreturn
  8. 141 sys53056,1,2,2,23,18:no=no-1
  9. 145 poke214,2:poke211,2:sys58732:printna$(zu(no+1)):return
  10. 200 poke53280,6:poke53281,6
  11. 201 print"[147][158]"tab(9)"eplox's directory-sort"
  12. 202 printtab(8)"------------------------":ifdg=1then210
  13. 203 print" f1  eintrag markieren/einordnen"
  14. 204 print" f2  trennstrich erzeugen"
  15. 205 print" f3  auf"
  16. 206 print" f4  loeschen"
  17. 207 print" f5  ab"
  18. 208 print" f8  speichern"
  19. 209 print "   bitte diskette einlegen":dg=1:poke198,0:wait198,63:goto201
  20. 210 open1,8,15,"i":diman$(145),na$(145),re$(145),zu(146),sn(19)
  21. 215 fori=1to18:readsn(i):next
  22. 218 fori=52992to53242:readx:pokei,x:next
  23. 219 gosub110:open2,8,2,"#":gosub110
  24. 220 s=1:c=1:n$=chr$(0):nn$=n$+n$+n$
  25. 223 fori=1to10:nu$=nu$+nn$:next
  26. 225 an$(0)=chr$(128)+chr$(18)+chr$(1):na$(0)="----------------"
  27. 226 re$(0)=nn$+nn$+nn$+n$+n$
  28. 230 print#1,"u1 2 0 18"s:print"[150]"s"[157] "
  29. 235 get#2,t$:get#2,s$:s=asc(s$+n$)
  30. 240 forbp=0to7:print#1,"b-p 2";bp*32+2
  31. 270 sys52992,2,3,x$:an$(c)=x$:ifleft$(x$,1)=n$thennext:goto320
  32. 290 sys52992,2,16,x$:na$(c)=x$:sys52992,2,11,x$:re$(c)=x$
  33. 300 zu(c)=c:print""c"[157] ":c=c+1:next
  34. 320 ift$<>""then230
  35. 400 close2:poke650,128:print"[144]>[159][145]";:cp=2:no=0:en=c:ifen>23thenen=23
  36. 410 printchr$(13)tab(2)na$(nu+1);:nu=nu+1:ifnu<en-1then410
  37. 440 getta$:ifta$=""then440
  38. 450 ifta$="[134]"thenifcp>2thencp=cp-1:sys53056,0,2,0,23,0
  39. 455 ifta$="[134]"thenifcp=2thengosub140
  40. 460 ifta$="[135]"thenifcp<enthencp=cp+1:sys53056,1,2,0,23,0
  41. 465 ifta$="[135]"thenifcp>=23thengosub130
  42. 470 ifta$="[133]"then1000
  43. 480 ifta$="[137]"thenifc<145thenf=1:c=c+1:print"[150]"c-1"[157] [159]":en=en+1:ifen>23thenen=23
  44. 485 ifta$="[137]"theniff=1thenf=0:te=0:te$=na$(0):goto1010
  45. 490 ifta$="[140]"then3000
  46. 495 ifta$=""then3040
  47. 500 goto440
  48. 1000 te=zu(no+cp-1):te$=na$(te)
  49. 1005 sys53056,0,cp,2,23,18:ifc>23thenen=en+1:gosub135:en=en-1
  50. 1007 fori=no+cp-2toc-1:zu(i+1)=zu(i+2):next
  51. 1010 poke214,cp:poke211,19:sys58732
  52. 1020 print"[163][163]"te$
  53. 1040 getta$:ifta$=""then1040
  54. 1050 ifta$="[134]"thenifcp>2thencp=cp-1:sys53056,0,2,19,24,37:sys53056,0,2,0,23,0
  55. 1055 ifta$="[134]"thenifcp=2thengosub140
  56. 1060 ifta$="[135]"thenifcp<enthencp=cp+1:sys53056,1,2,19,24,37:sys53056,1,2,0,23,0
  57. 1065 ifta$="[135]"thenifcp=23thengosub130
  58. 1070 ifta$="[133]"then2000
  59. 1075 ifta$="[138]"thente$="":c=c-1:en=c:ifen>23thenen=23
  60. 1076 ifta$="[138]"thenprint"[150]"c-1"[157] [159]":goto2050
  61. 1080 goto1040
  62. 2000 sys53056,1,cp,2,23,18
  63. 2040 fori=c-1tono+cp-1step-1:zu(i+1)=zu(i):next:zu(no+cp-1)=te
  64. 2050 poke214,cp:poke211,2:sys58732
  65. 2060 printte$"                   "
  66. 2199 goto440
  67. 3000 open2,8,2,"#":t=18:fori=0toint((c-2)/8):if8*i+8>=c-1thent=0
  68. 3010 print#1,"b-p 2 0":print#2,chr$(t)chr$(sn(i+2))
  69. 3020 forbp=0to7:print#1,"b-p 2";bp*32+2
  70. 3023 ifbp+8*i+1>=cthenprint#2,nu$;:next:goto3030
  71. 3025 print#2,an$(zu(bp+8*i+1))na$(zu(bp+8*i+1))re$(zu(bp+8*i+1));:next
  72. 3030 print#1,"u2 2 0 18"sn(i+1):print"[150]"tab(36)sn(i+1)"[157] [159]":gosub110:next
  73. 3040 close1:close2:run
  74. 10000 data1,4,7,10,13,16,2,5,8,11,14,17,3,6,9,12,15,18
  75. 10001 data32,253,174,32,158,183,32,30,225,32,253,174,32,158,183,138,72,32,253
  76. 10002 data174,32,139,176,133,73,132,74,32,163,182,104,32,117,180,160,2,185
  77. 10003 data97,0,145,73,136,16,248,200,32,18,225,145,98,200,196,97,208,246,32
  78. 10004 data204,255,96,0,0,0,0,0,32,245,207,138,72,32,245,207,224,0,176,3,76
  79. 10005 data72,178,224,24,176,249,134,251,32,245,207,224,0,144,240,224,39,176
  80. 10006 data236,134,253,32,245,207,224,25,176,227,134,252,232,138,56,229,251
  81. 10007 data144,218,240,216,133,250,32,245,207,224,40,176,207,228,253,144,203
  82. 10008 data134,254,104,170,165,172,72,165,173,72,165,174,72,165,175,72,224,0
  83. 10009 data208,22,166,251,198,250,240,44,32,240,233,232,189,240,236,133,172
  84. 10010 data181,217,32,219,207,48,236,202,240,3,76,72,178,166,252,198,250,240
  85. 10011 data16,32,240,233,202,189,240,236,133,172,181,217,32,219,207,48,236,164
  86. 10012 data254,32,240,233,32,36,234,169,32,145,209,136,196,253,16,249,76,88
  87. 10013 data233,41,3,13,136,2,133,173,32,224,233,164,254,177,172,145,209,177
  88. 10014 data174,145,243,136,196,253,16,243,96,32,253,174,76,158,183
  89.