The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>The</strong> @FSPEC SVC will transfer the filespec contained on the command line in<strong>to</strong> the FCB. Any<br />
conversion <strong>to</strong> upper case will be performed as required which permits the entry of the<br />
filespec in upper or lower case. Typically, you would want <strong>to</strong> provide a default file<br />
extension <strong>to</strong> save the user the time it takes <strong>to</strong> enter up <strong>to</strong> four additional characters<br />
when the application is designed for a class of file (such as TXT, ASM, JCL extensions).<br />
A default file extension will not override any extension entered with the filespec. A<br />
default will add an extension provided by the program only if the user omitted one. This<br />
default can be added as follows:<br />
PUSH HL ;Don't disturb command line pointer<br />
LD HL,TXTEXT ;Point <strong>to</strong> s<strong>to</strong>rage of default<br />
LD DE,FCB1 ;Point <strong>to</strong> FCB as required<br />
LD A,@FEXT ;Identify the SVC<br />
RST 40 ;Invoke the SVC<br />
POP HL ;Res<strong>to</strong>re the pointer<br />
.<br />
.<br />
.<br />
TXTEXT DB 'TXT' ;Data field for default extent<br />
Other times we may want <strong>to</strong> prompt the user <strong>to</strong> enter a filespec. This is achieved through<br />
a combination of @DSPLY and @KEYIN as follows:<br />
LD HL,SPCMSG$ ;Point <strong>to</strong> message<br />
LD A,@DSPLY ;Identify the SVC<br />
RST 40 ;Invoke the SVC<br />
LD HL,FCB1 ;Use the FCB for input buffer<br />
LD BC,31