Page 1 of 1

Help with dir from qdos

Posted: Wed Oct 28, 2020 7:21 am
by chernandezba
Hi

I'm working on my ZEsarUX emulator and the command "dir mdv1_" (or mdv2_, etc).
As you may remember, I don't emulate microdrive but I handle all QDOS filesystem calls and emulate them with files from your computer.

Seems the QL SuperBasic calls the following procedures to open a directory:

1) IO.OPEN device "mdv1_"
2) FS.MDINF to get microdrive name (medium info)
3) IO.FSTRG. D2=64: seems it wants to get 64 bytes from the first directory file. It's called repeatedly after I return a EOF

I don't know about what is the data format expected at step 3. I've tried filling it with the typical 64 byte directory entry (file length, file access key, file type etc) but nothing is displayed on the screen (except from the medium info at step 2). After that call I return A1=A1+64, and D1=64.

Anybody knows what is the data format expected for a directory listing? (dir mdv1_)

Thanks
Regards
Cesar

Re: Help with dir from qdos

Posted: Wed Oct 28, 2020 7:37 am
by tofro
chernandezba wrote:Hi

I'm working on my ZEsarUX emulator and the command "dir mdv1_" (or mdv2_, etc).
As you may remember, I don't emulate microdrive but I handle all QDOS filesystem calls and emulate them with files from your computer.

Seems the QL SuperBasic calls the following procedures to open a directory:

1) IO.OPEN device "mdv1_"
2) FS.MDINF to get microdrive name (medium info)
3) IO.FSTRG. D2=64: seems it wants to get 64 bytes from the first directory file. It's called repeatedly after I return a EOF

I don't know about what is the data format expected at step 3. I've tried filling it with the typical 64 byte directory entry (file length, file access key, file type etc) but nothing is displayed on the screen (except from the medium info at step 2). After that call I return A1=A1+64, and D1=64.

Anybody knows what is the data format expected for a directory listing? (dir mdv1_)

Thanks
Regards
Cesar
The contents of the directory file is just a concatenation of all the 64-byte-headers of the files in that directory (see your other question)

Re: Help with dir from qdos

Posted: Tue Nov 03, 2020 5:12 pm
by chernandezba
Thanks. I've rewritten and tested my code and now it works

Cheers
Cesar