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.

Exit:<br />

A Error return code<br />

CF Set if a new file was created<br />

Z Set if no error is encountered during the INIT.<br />

7.6.44 @IPL SVC-00<br />

This SVC will reboot the system. It functions the same as pressing the hardware RESET<br />

but<strong>to</strong>n. A usable booting system disk must be available in physical drive 0.<br />

Registers Affected: Not applicable<br />

7.6.45 @KBD SVC-08<br />

This SVC will scan the *KI device and return the fetched character, if any character is<br />

available. Note that it is possible <strong>to</strong> generate an end-of-file (EOF) error from the<br />

physical keyboard (NZ with A=X'1C'). Consult the DOS manual for your particular<br />

installation <strong>to</strong> ascertain what key entry establishes the EOF indication. On the TRS-80<br />

Model 4, for instance, the entry generates the EOF.<br />

Registers Affected: AF, DE.<br />

Exit:<br />

A Contains the value of the key depressed or error return code.<br />

Z Set <strong>to</strong> indicate register-A contains the entered key code. If reset, then<br />

either no key was depressed or an error occurred. Register-A will contain a<br />

zero (X'00') under no-key, no-error. Register-A will contain a non-zero<br />

error code if an error was detected during the character "get" (perhaps a<br />

route?).<br />

7.6.46 @KEY SVC-01<br />

This SVC will continuously scan the *KI device until a character is available. It will<br />

not return until a character is available.<br />

Registers Affected: AF, DE.<br />

Exit:<br />

A Contains the character entered or error code.<br />

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

7.6.47 @KEYIN SVC-09<br />

This SVC will accept a line of input until terminated by either an or .<br />

During the input, the routine will display the entries. Backspace, tab, and line delete<br />

are supported. KEYIN exits with the cursor in whatever state it was in at the time KEYIN<br />

was entered.<br />

Registers Affected: AF, BC, DE.<br />

Entry:<br />

HL Pointer <strong>to</strong> user line buffer of length = B+1.<br />

B Maximum number of characters <strong>to</strong> input.<br />

C Should contain a zero (possible enhancement of KEYIN will use register C <strong>to</strong><br />

contain a fill character).<br />

Exit:<br />

B Contains the actual number of characters input.<br />

CF Set if terminated the input.<br />

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

7-27

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

Saved successfully!

Ooh no, something went wrong!