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.36 @GTDCT SVC-81<br />

This SVC will obtain a pointer <strong>to</strong> the Drive Control Table (DCT) associated with the<br />

requested logical drive. See the section on DRIVE CONTROL TABLE in chapter 4 for detailed<br />

information on the DCT.<br />

Registers Affected: AF, IY.<br />

Entry:<br />

C logical drive number (0-7).<br />

Exit:<br />

IY the Drive Code Table address.<br />

7.6.37 @GTMOD SVC-83<br />

This SVC will locate the entry address of a module resident in memory provided all<br />

resident modules use the established header pro<strong>to</strong>col.<br />

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

Entry:<br />

DE Pointer <strong>to</strong> the module name terminated with an ETX (or any character in the<br />

range (X'00'-X'1F').<br />

Exit:<br />

HL Returned entry address of the module.<br />

DE Pointer <strong>to</strong> address of first byte past the module name s<strong>to</strong>rage within the<br />

module header.<br />

Z Set if the module is found in memory.<br />

7.6.38 @HDFMT SVC-52<br />

This SVC is used <strong>to</strong> pass a function 12 (X'0C') <strong>to</strong> a disk driver. It is commonly used <strong>to</strong><br />

pass a "format drive" command <strong>to</strong> a hard disk controller. See chapter 4 for more<br />

information.<br />

Registers Affected: AF [Note: DOS saves BC, IY; drivers should save registers any<br />

other registers they use].<br />

Entry:<br />

C <strong>The</strong> logical drive number (0-7).<br />

Exit:<br />

A <strong>The</strong> return code if an error.<br />

Z Set if no error.<br />

7.6.39 @HEX16 SVC-99<br />

This SVC will convert a 16-bit binary number <strong>to</strong> hex ASCII.<br />

Registers Affected: AF, HL.<br />

Entry:<br />

DE Contains the value <strong>to</strong> be converted.<br />

HL A pointer <strong>to</strong> your 4 character buffer.<br />

Exit:<br />

HL Points <strong>to</strong> end of buffer + 1.<br />

7-25

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

Saved successfully!

Ooh no, something went wrong!