3 ms·
The input handling for file names is shit -- the GETWORD and MUSTGETWORD routines, doesn't check if the file name (or) extension exceeds the length (8 character
by captaincrunch 2y ago
The input handling for file names is shit -- the GETWORD and MUSTGETWORD routines, doesn't check if the file name (or) extension exceeds the length (8 characters for the filename and 3 for the extension).
GETWORD:
CALL GETLET
JBE NONAM ;Exit if termination character
DEC SI
MUSTGETWORD:
CALL GETLET
JBE FILLNAM
JCXZ MUSTGETWORD
DEC CX
CMP AL,"*" ;Check for ambiguous file specifier
JNZ NOSTAR
MOV AL,"?"
REP STOSB
NOSTAR:
STOSB
CMP AL,"?"
JNZ MUSTGETWORD
OR DL,1 ;Flag ambiguous file name
JMP MUSTGETWORD
FILLNAM:
MOV AL," "
REP STOSB
DEC SI
- rep_lodsb 2y agoIf it's longer than 8.3, the name is shortened, or runs into the extension field. It's a design decision, not a bug: https://devblogs.microsoft.com/oldnewthing/20071217-00/?p=24143 https://devblogs.microsoft.com/oldnewthing/20071217-00/?p=24...