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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Exit:<br />

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

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

7.6.95 @WRSSC SVC-54<br />

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

sec<strong>to</strong>r (used in the direc<strong>to</strong>ry cylinder). Where the disk controller supports the IBM Data<br />

Address Mark convention, the controller command should denote the "deleted data mark", or<br />

X'F8' in lieu of the standard data mark (X'FB'). This distinct mark is used in the @RDSEC<br />

command <strong>to</strong> detect the presence of a system (direc<strong>to</strong>ry) sec<strong>to</strong>r. Other than this Data<br />

Address Mark variation, @WRSSC is the same as @WRSEC; however, the DOS will use @WRSSC<br />

for all writes <strong>to</strong> the direc<strong>to</strong>ry cylinder. 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 />

Exit:<br />

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

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

7.6.96 @WRTRK SVC-55<br />

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

track on a disk drive. Where the data pattern is under software control (as is the case<br />

for floppy disk drives), the data format must conform <strong>to</strong> that identified in your<br />

controller's reference manual. Hard drives that are formatted by track may use this SVC<br />

<strong>to</strong> control the track <strong>to</strong> track formatting. If the target drive is a floppy disk, then it<br />

is necessary <strong>to</strong> precede the @WRTRK SVC with a drive select via SVC @SLCT. See chapter 4<br />

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 />

HL Contains a pointer <strong>to</strong> the buffer containing the format data<br />

D Contains the number of the cylinder <strong>to</strong> write.<br />

Exit:<br />

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

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

7-44

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

Saved successfully!

Ooh no, something went wrong!