Hi!
I'm new owner of C1581. As everybody know they can have subdirs.
And here's my problem.
I used equivalent of BASIC command OPEN15,8,15,"/MYDIR":CLOSE15 in assembler.
Also tried "/0:MYDIR", but never was directory changed...
Can anybody explain it me?
Thank you all for every help.
Miro
Please help me this:
I want to change partition to DIR on drive 8.
In attachment is source code, works not, don't know why...
Thanks.
Miro
I'm assuming this: you have formatted the partition as a dos partition when you created the partition. Sorry, for the overuse of the word partition in that last sentence... partition. partition. he he. Another 'quirk' of the '81 is that when it encounters an i0: command, it will jump out of any partition and send you back to the root directory. I'm not too sure if a clrchn kernel call or something else in your other code is cosing an init to the '81 or not. Just a thought here, but if you redirect the i0: command at location $198 in the '81s RAM to an RTS instruction, your problems might stop. I don't know off-hand if an clrchn will initiate an init or not. That is all my head has in it on this topic at the moment.
C
I haven't tested this but is "/DIR" really a file to be opened if you are sending a command to the command channel (equivalent to a PRINT#15,"/DIR")?
I believe you should open the command channel like this:
LDA #$0f
LDX drive ; your variable
LDY #$0f
JSR SETLFS
LDA #$00
TAX
TAY
JSR SETNAM
(on a 128 you should also perform a SETBNK ($ff68) to provide the bank the filename is in)
LDX #$00
LDA $C6
JSR SETBNK
JSR OPEN
Then you would send your command to switch to the /DIR directory to the open command channel.
I've actually never used this "feature" of the 1581... I honestly never had a need for it on an 800KB disk.
Quote from: Andrew Wiskow on February 26, 2010, 08:17 AM...I honestly never had a need for it on an 800KB disk.
If you needed to put lots of small files (past Commodore's DOS limit) onto one disk, then partitions were the way to go.
Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
The Other Group of Amigoids
http://www.calweb.com/~rabel1/
Southern California Commodore/Amiga Network
http://www.sccaners.org/
Hi!
Thanks for lot of help.
It was useful. Now I can change partition in 1581 disk.
But don't know how to display directory of any partition. Every time displays my routine whole directory, not only selected partition.
So, I want to ask how to display partition directory?
Thanks for every help.
Miro
Here in attachment is source code of my directory routine.
Just to check, is the 1581 partition formatted and does it contain unique files? This was asked before but worth double-checking.
From my understanding of the 1581, after you select a partition it becomes the 'working drive'. In your code what are you using for 'dirname' (your variable)?
It seems if the desired partition is your 'working drive' then dirname should just be '$0'.
You might want to look at the program 'Partition Aid' on the 1581 test demo disk. It provides some good examples of code for working with 1581 partitions. There is ML attached to the end of this program. You could examine it by breaking it and going into the monitor.