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 Passes the error return code if an error is encountered.<br />

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

7.6.68 @RDSSC SVC-85<br />

This SVC will read the direc<strong>to</strong>ry system sec<strong>to</strong>r identified by the calling linkage. <strong>The</strong><br />

cylinder number containing the direc<strong>to</strong>ry that is loaded in<strong>to</strong> register D is recovered from<br />

the Drive Control Table (DCT). <strong>The</strong> DCT for the each drive is obtained via the @GTDCT SVC.<br />

Registers Affected: AF.<br />

Entry:<br />

HL A pointer <strong>to</strong> the buffer <strong>to</strong> receive the sec<strong>to</strong>r of system data.<br />

D Contains the logical cylinder number <strong>to</strong> read (0-255).<br />

E Contains the logical sec<strong>to</strong>r number <strong>to</strong> read (0-255).<br />

C Contains the the logical drive number.<br />

Exit:<br />

A Passes the error return code if an error is encountered.<br />

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

7.6.69 @RDTRK SVC-51<br />

This SVC passes a function 11 <strong>to</strong> a disk driver. It is commonly used for reading an entire<br />

track of a floppy disk where permitted by the controller. See chapter 4 for additional<br />

information.<br />

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

registers they use].<br />

Entry:<br />

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

HL A pointer <strong>to</strong> the buffer which will receive the data transfer.<br />

Exit:<br />

A Contains an error return code, if any.<br />

Z Set if the operation was successful.<br />

7.6.70 @READ SVC-67<br />

This SVC will read a logical record from an open file. If the LRL defined at open time<br />

was 256 (0), then the next sequential sec<strong>to</strong>r identified by the Next Record Number (NRN)<br />

contained in the File Control Block (FCB) will be transferred <strong>to</strong> the buffer established<br />

at open time. For Logical Record Lengths (LRLs) between 1 and 255, the next logical<br />

record will be placed in<strong>to</strong> the user record buffer, UREC, identified in the @READ SVC. <strong>The</strong><br />

3-byte NRN is updated after the read operation so as <strong>to</strong> prepare for the next sequential<br />

read operation.<br />

Registers Affected: AF.<br />

DE A pointer <strong>to</strong> the FCB for the file <strong>to</strong> read.<br />

HL A pointer <strong>to</strong> the UREC (needed if LRL 0).<br />

Exit:<br />

A Will contain an error return code if an error was encountered.<br />

Z Set if the operation was successful.<br />

7-35

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

Saved successfully!

Ooh no, something went wrong!