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 Will contain an error return code if an error was encountered.<br />

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

7.6.91 @WEOF SVC-74<br />

This SVC will force the system <strong>to</strong> update the direc<strong>to</strong>ry entry with the current end-of-file<br />

information. <strong>The</strong> file's FCB will remain in an open state.<br />

Registers Affected: AF.<br />

Entry:<br />

DE A pointer <strong>to</strong> the FCB for the file <strong>to</strong> WEOF.<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.6.92 @WHERE SVC-07<br />

This SVC can be invoked <strong>to</strong> determine the address of the calling routine. It can be useful<br />

for small routines that are <strong>to</strong> be made run-time relocatable.<br />

Registers Affected: AF, HL.<br />

Exit:<br />

HL Returns the memory address following the SVC instruction.<br />

7.6.93 @WRITE SVC-75<br />

This SVC will cause a write <strong>to</strong> the next record identified in the FCB. If the file's<br />

Logical Record Length (LRL) identified in the FCB is less than 256, then the logical<br />

record in the user buffer will be transferred <strong>to</strong> the file. If LRL is equal <strong>to</strong> 256, a full<br />

sec<strong>to</strong>r I/O will be made using the disk I/O buffer identified at file open time.<br />

Registers Affected: AF.<br />

Entry:<br />

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

HL A pointer <strong>to</strong> the user record buffer (UREC) containing the logical record<br />

(where the LRL is 256).<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.6.94 @WRSEC SVC-53<br />

This SVC will pass a function code 13 <strong>to</strong> a disk driver. It is used <strong>to</strong> write a physical<br />

sec<strong>to</strong>r of data <strong>to</strong> the disk. 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 number of the cylinder <strong>to</strong> write.<br />

E Contains the number of the sec<strong>to</strong>r <strong>to</strong> write.<br />

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

7-43

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

Saved successfully!

Ooh no, something went wrong!