1 post / 0 new
need help with a program that i am writing

hello everyone i'm working on writing a small disk utility for the c128 in 64 only mode but I need help to read a directory with out losing the dir utility. i'll post the code on here and also I found some thing in 64hdd manual but I get errors using it on real commodore drives was going to put that in my prog but it didn't work for me so here it is i'm trying to keep it as basic and simple as possible with out fancy gosub and returns etc.

utils code:

<code>
10 bc=0:fc=0:tc=3
20 printchr$(147):poke 53281,bc:poke 53280,fc:poke 646,tc
30 print"disk utils v2.0 2016 eric schmidt"
35 print"£££££££££££££££££££££££££££££££££"
40 print
50 print" main menu:"
52 print" ££££££££££"
60 print
65 print" f1 - #8 directory"
70 print" f3 - #9 directory"
75 print" f5 - #10 directory"
80 print" f7 - #11 directory"
85 print" u - update disk utils"
90 print" l - load file"
95 print" w - load dos wedge"
100 print" f - format disk"
105 print" x - load custom directory"
106 print" c - file copy utility"
110 rem print" r - read error channel"
111 print" s - screen colors"
115 print""
116 print" enter a menu choice:"
117 print""
150 print"££££££££££££££££££££££££££££££££££££££££"
200 get a$
210 if a$ ="" then 200
220 if a$=chr$(133) then 400 else 200
230 if a$=chr$(134) then 450 else 200
240 if a$=chr$(135) then 500 else 200
250 if a$=chr$(136) then 550 else 200
260 if a$="u" then 600 else 200
270 if a$="l" then 650 else 200
280 if a$="w" then 1000 else 200
290 if a$="f" then 750 else 200
300 if a$="x" then 1200 else 200
310 if a$="c" then 850 else 200
320 if a$="s" then 900 else 200
400 rem 12343
598 goto 20
599 rem ---(save and replace prg
600 save"@0:diskutils",8:rem save
610 verify"diskutils",8:rem verify file
611 goto 20:rem
649 rem ---(load a file
650 printchr$(147):rem
655 input"file name";n$
658 input"drive #";d
660 load n$,d:run
749 goto 20:rem format disk
750 printchr$(147):poke 53280,2:poke53281,0:poke 646,7
755 input "drive #";t
760 input "header name";h$
770 print"last chance continue q - for y or n":rem
775 get z$
780 if z$ ="q" then 790 else goto 10:rem
781 if z$="n" then 10 else goto 10
782 if z$="" then 775
789 goto 10
790 open 15,t,15:print#15,"n:h$,1a"
800 close 15:goto 20
849 goto 20
850 load"filecopy",8:run
999 goto 20
1000 load"64-wedge",8:run
1199 goto 20
1200 input"directory name"y$
1300 load y$,8:list
</code>

and the other commands I found here
1 open 1,10,3,"$"
2 rem input#1,d$
5 input#1,bl,fl$,ty$
6 if ty$="fre" then 10
7 print bl,fl$,ty$
8 goto 5
10 print bl;fl$
15 close 1
</code>
<code>

Edited by: commadore129 on 2016-10-30 15:32