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

From WikiTI
Revision as of 23:44, 16 August 2006 by Brandonw (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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