29.12.2012 Views

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 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.6.27 @DSPLY SVC-10<br />

This SVC will display a message line <strong>to</strong> the *DO device. <strong>The</strong> line must be terminated with<br />

either an (X'0D') or an ETX (X'03'). If an ETX terminates the line, the cursor<br />

will be positioned immediately after the last character displayed.<br />

Registers Affected: AF, DE.<br />

Entry:<br />

HL points <strong>to</strong> the 1st byte of your message.<br />

7.6.28 @ERROR SVC-26<br />

This SVC will provide an entry <strong>to</strong> post an error message. @ERROR will normally terminate<br />

<strong>to</strong> the @ABORT SVC. If bit 7 of the error register is SET, the error message will be<br />

displayed and return will be made <strong>to</strong> the calling program. If bit 6 of the error register<br />

is reset, the complete error information shown below is displayed. If bit 6 is set, then<br />

only the "Error message string" [see Chapter 8, the Appendix, Error Message Dictionary]<br />

is displayed.<br />

Registers Affected: AF [Note: not applicable if @ABORT option].<br />

Entry:<br />

C Error number with bits 6 and 7 optionally set.<br />

DE Optional string buffer pointer used with CFLAG option.<br />

It is possible <strong>to</strong> have @ERROR return the message string associated with the error<br />

by setting bit-7 of the CFLAG$ (see SVC-101). This can be useful if you want <strong>to</strong><br />

control the positioning of the message. Also, in the case of compilers and<br />

interpreters, it can be useful <strong>to</strong> use this option as a means of providing greater<br />

flexibility <strong>to</strong> the application program.<br />

*** Error code = xx, Returns <strong>to</strong> X'dddd'<br />

<br />

Last SVC = nnn, Returned <strong>to</strong> X'rrrr'<br />

7.6.29 @EXIT SVC-22<br />

This is the normal SVC <strong>to</strong> perform a program exit and return <strong>to</strong> DOS. Alternatively, if<br />

your program maintains the integrity of the stack pointer, then a simple RET instruction<br />

will return <strong>to</strong> the system.<br />

Registers Affected: Not applicable.<br />

Entry:<br />

HL Must be loaded with the return code (0 = no error).<br />

7.6.30 @FEXT SVC-79<br />

This SVC will set up a default file extension in the FCB if the file specification<br />

entered contains no extension.<br />

Registers Affected: AF.<br />

Entry:<br />

DE A pointer <strong>to</strong> the File Control Block.<br />

HL Pointer <strong>to</strong> the 3-character default extension which must be s<strong>to</strong>red in upper<br />

case.<br />

7-19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!