Help with FS.HEADR call
Posted: Fri Oct 23, 2020 7:09 am
Hi
In my ZEsarUX emulator I handle the QDOS microdrive calls to emulate them to use computer files, instead of microdrives. I'm trying to understand how the FS. HEADR call works.
The parameters, as I read in the "QL Technical Guide" are:
Call:
D2.W buffer length
D3.W timeout
A0 channel lD
A1 base of read buffer
Return:
D1.W length of header read
A1 top of read buffer
First, I don't understand the difference between "A1 base of read buffer" and "A1 top of read buffer". What is the difference between "base" and "top" in this case?
Also, what are the header fields returned? The info says "The buffer provided must be at least 14 bytes long."
Are these 14 bytes the first 14 of the 64-byte header:
00 long file length
04 byte file access key (not yet implemented - currently always zero)
05 byte file type
06 8 bytes file type-dependent information
0E 2+36 bytes filename
34 long reserved for update date (not yet implemented)
38 long reserved for reference date (not yet implemented)
3c long reserved for backup date (not yet implemented)
So the call returns until the first 14:
00 long file length
04 byte file access key (not yet implemented - currently always zero)
05 byte file type
06 8 bytes file type-dependent information
Is that right?
I hope someone can help me with this. Thanks a lot!
Cheers
Cesar
In my ZEsarUX emulator I handle the QDOS microdrive calls to emulate them to use computer files, instead of microdrives. I'm trying to understand how the FS. HEADR call works.
The parameters, as I read in the "QL Technical Guide" are:
Call:
D2.W buffer length
D3.W timeout
A0 channel lD
A1 base of read buffer
Return:
D1.W length of header read
A1 top of read buffer
First, I don't understand the difference between "A1 base of read buffer" and "A1 top of read buffer". What is the difference between "base" and "top" in this case?
Also, what are the header fields returned? The info says "The buffer provided must be at least 14 bytes long."
Are these 14 bytes the first 14 of the 64-byte header:
00 long file length
04 byte file access key (not yet implemented - currently always zero)
05 byte file type
06 8 bytes file type-dependent information
0E 2+36 bytes filename
34 long reserved for update date (not yet implemented)
38 long reserved for reference date (not yet implemented)
3c long reserved for backup date (not yet implemented)
So the call returns until the first 14:
00 long file length
04 byte file access key (not yet implemented - currently always zero)
05 byte file type
06 8 bytes file type-dependent information
Is that right?
I hope someone can help me with this. Thanks a lot!
Cheers
Cesar