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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7.6.10 @CLOSE SVC-60<br />

This SVC will close a file or device. If a file is closed, the direc<strong>to</strong>ry is updated which<br />

is essential. All files that have been opened with UPDATE access or greater must be<br />

closed.<br />

Registers Affected: AF.<br />

Entry:<br />

DE A pointer <strong>to</strong> your File or Device Control Block.<br />

Exit:<br />

A Will contain any error return code.<br />

Z Set if no error was encountered.<br />

7.6.11 @CLS SVC-105<br />

This SVC was installed in release 6.2.0. It will clear the video screen via an @DSP of<br />

HOME and CLEAR-TO-END-OF-FRAME.<br />

Registers Affected: AF<br />

Exit:<br />

Z Set if no error was encountered, otherwise reset (i.e. NZ).<br />

A Contains the error code under an NZ condition.<br />

7.6.12 @CMNDI SVC-24<br />

This SVC passes control <strong>to</strong> the command interpreter. Your command string will be invoked<br />

just as if it was entered in response <strong>to</strong> a "DOS Ready".<br />

Registers Affected: Not applicable..<br />

Entry:<br />

HL A pointer <strong>to</strong> the start of a line buffer containing your command string<br />

terminated with an (X'0D'). Only the first 79 characters of your<br />

command string will be used.<br />

7.6.13 @CMNDR SVC-25<br />

This SVC will execute a command similarly <strong>to</strong> @CMNDI; however, upon completion of the<br />

command, control will be returned <strong>to</strong> the address following the @CMNDR invocation. It is<br />

necessary for all executing commands <strong>to</strong> maintain the stack pointer and exit via an RET<br />

instruction after loading HL with the return code. It is possible <strong>to</strong> limit the execution<br />

<strong>to</strong> DOS LIBrary commands by setting bit-4 of the CFLAG$ (see @FLAGS SVC).<br />

Registers Affected: Dependent on command executed.<br />

Entry:<br />

HL A pointer <strong>to</strong> the start of a line buffer containing your command string<br />

terminated with an (X'0D'). Only the first 79 characters of your<br />

command string will be used.<br />

Exit:<br />

HL Will contain the return code of the executing command.<br />

7.6.14 @CTL SVC-05<br />

This SVC will output a control byte <strong>to</strong> a logical device. If a device control block is<br />

referenced, the TYPE byte must permit CTL operation. <strong>The</strong> file access routines will ignore<br />

@CTL requests and provide a "no error" return code. Control pro<strong>to</strong>col is very unique <strong>to</strong><br />

each device. See chapter 3, DEVICE INPUT/OUTPUT INTERFACING, for additional information.<br />

7-14

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

Saved successfully!

Ooh no, something went wrong!