83Plus:Software:usb8x/Asm Interface/MSD/FAT getStartingCluster
Minimum usb8x version: 0.10
Gets the starting cluster of a directory. It is a necessary input for some routines.
- HL points to an ASCIIZ string of the directory path
- HL is the starting cluster of this directory
- C set if problems
- AF, BC, DE, HL
"Starting cluster" is a FAT16 term to represent a directory, but it is used in some routines because it is a much smaller alternative to keeping a large ASCIIZ string of a directory path.
The root directory will always have 0000h as its starting cluster.
Here is example code to get the starting cluster of the "test" directory:
ld hl,sDir U_CALL FAT_getStartingCluster ;HL is starting cluster (ex. 0002h) ... sDir: DB "/test",0
If you are writing an application, you must copy the strings you use to RAM first, or else usb8x will not be able to see them.