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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Entry:<br />
DE A pointer <strong>to</strong> the FCB containing the program's filespec.<br />
Exit:<br />
BC Returns a pointer <strong>to</strong> the start of the system command buffer.<br />
HL Contains the error return code if an error was encountered.<br />
7.6.80 @RWRIT SVC-70<br />
This SVC will rewrite the current sec<strong>to</strong>r following a write operation. <strong>The</strong> @WRITE function<br />
advances the Next Record Number (NRN) after the sec<strong>to</strong>r is written. @RWRIT will decrement<br />
the NRN and write the disk buffer again.<br />
Registers Affected: AF.<br />
Entry:<br />
DE A pointer <strong>to</strong> the FCB for the file sec<strong>to</strong>r <strong>to</strong> rewrite.<br />
Exit:<br />
A Contains an error return code if an error was encountered.<br />
Z Set if the operation was successful.<br />
7.6.81 @SEEK SVC-46<br />
This SVC will pass a function code 6 <strong>to</strong> a disk driver. It is used <strong>to</strong> issue a controller<br />
SEEK command. Disk controllers optionally verify only the track address, therefore it is<br />
not necessary <strong>to</strong> pass a sec<strong>to</strong>r number <strong>to</strong> @SEEK. See chapter 4 for additional information.<br />
Registers Affected: AF [Note: DOS saves BC, IY; drivers should save any other<br />
registers they use].<br />
Entry:<br />
C Contains the logical drive number.<br />
D Contains the logical cylinder requested.<br />
7.6.82 @SEEKSC SVC-71<br />
This SVC is used <strong>to</strong> seek a specified file record prior <strong>to</strong> attempting <strong>to</strong> read or write the<br />
record. <strong>The</strong> record identified for the seek operation will be that determined by the Next<br />
Record Number (NRN) identified in the File Control Block (FCB). <strong>The</strong> SEEK operation may<br />
require that the current file buffer be written back <strong>to</strong> disk if it contains updated<br />
information and the desired record is located in a different disk sec<strong>to</strong>r. If an error<br />
occurs in this operation, the error code will be returned. <strong>The</strong> return code condition will<br />
never reflect an error for the actual SEEK itself. @SEEKSC serves a useful purpose only<br />
when asynchronous I/O is implemented permitting disk seeking external <strong>to</strong> CPU control. On<br />
the TRS-80 Model 4, it is unnecessary.<br />
Registers Affected: AF.<br />
Entry:<br />
DE A pointer <strong>to</strong> the File Control Block of the file.<br />
Exit:<br />
A Contains an error code if an error is encountered in writing.<br />
Z Set will indicate that the SEEK operation "completed".<br />
7.6.83 @SKIP SVC-72<br />
This SVC will cause a skip past the next logical record. <strong>The</strong> SKIP operation may require<br />
that the current file buffer be written back <strong>to</strong> disk if it contains updated information<br />
and the desired record is located in a different disk sec<strong>to</strong>r. If any error is encountered<br />
7-38