83Plus:Software:usb8x/Asm Interface/MSD/FAT nameConvertTo11

From WikiTI
Jump to: navigation, search

Synopsis

Name: FAT_nameConvertTo11

Minimum usb8x version: 0.10

Converts file/directory name to 11-character format.

Inputs

  • HL points to name (can be zero-terminated or terminated with a forward slash)
  • DE points to an 11-byte buffer for formatted name (OP1-OP6 work well for this)

Outputs

  • HL points to 11-character formatted name

Destroys

  • AF, BC, DE, HL

Notes

Example code to convert "readme.txt" to "README TXT":

ld hl,sOldName
ld de,OP1
U_CALL FAT_nameConvertTo11
;HL points to formatted name in OP1
...
sOldName: DB "readme.txt",0

See Also

  • [[../FAT_nameConvertFrom11|FAT_nameConvertFrom11]] - Convert 11-character formatted name to ASCIIZ string