DOS Fn 29H: Parse Filename
Compatibility: 1.0+
Expects: AH 29H
AL bit-flags to select parsing options (see below)
DS:SI address of source text line to parse
ES:DI address of buffer to hold resulting unopened FCB
──────────────────────────────────────────────────────────────────
Returns: AL 0 if result FCB has no wildcard characters
1 if result FCB does contain wildcards▲
0ffH if invalid drive ID in filespec
DS:SI updated: points to the character just past the filename
ES:DI preserved: points to the unopened FCB
──────────────────────────────────────────────────────────────────
Info: Creates an unopened FCB from a text line or command parameter.
The text starting at DS:SI is parsed for a filespec in the format
D:FILENAME.EXT and the buffer at ES:DI is filled in as a
properly-formatted, unopened FCB.
═══► This Fn is NOT useful for a text line containing a pathname.
Basically, this is a quick way to skip leading spaces, upshift
and remove the dot (.) from a filename input from the keyboard.
It converts * into a series of ?s and it allows you to pre-set a
default in the destination FCB (e.g., extension = "WKS").
The parsing action depends upon these bit flags in AL:
╓7┬6┬5┬4┬3┬2┬1┬0╖
║0 0 0 0│ │ │ │ ║
╙─┴─┴─┴─┴╥┴╥┴╥┴╥╜ bit mask value
║ ║ ║ ╚═► 0: 1=scan off leading separators (a | 01H)
║ ║ ╚═══► 1: 1=use FCB drive byte as a default (a | 02H)
║ ╚═════► 2: 1=use FCB filename as a default (a | 04H)
╚═══════► 3: 1=use FCB extension as a default (a | 08H)
See Also: Fn 60H (Get Truename)
FCB File I/O
DOS Functions
-♦-