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.

Command Purpose<br />

RESTORE Recalibrate drive <strong>to</strong> track 0<br />

SEEK Position the read/write head <strong>to</strong> a cylinder<br />

READ SECTOR Transfer the specified sec<strong>to</strong>r from disk <strong>to</strong> CPU<br />

WRITE SECTOR Transfer the specified sec<strong>to</strong>r from CPU <strong>to</strong> disk<br />

FORMAT TRACK Initialize the ID and DATA fields of the track<br />

Figure 4-4: WD-1000 Controller Commands<br />

Command Purpose<br />

TEST DRIVE READY Test if drive is ready<br />

RECALIBRATE Recalibrate drive <strong>to</strong> track 0<br />

REQUEST SENSE STATUS Return the 4-byte drive/controller status<br />

FORMAT DRIVE Format entire disk<br />

CHECK TRACK FORMAT Check track for correct ID and interleave<br />

FORMAT TRACK Initialize the ID and DATA fields of the track<br />

READ Read the specified sec<strong>to</strong>r(s) from disk <strong>to</strong> CPU<br />

WRITE Write the specified sec<strong>to</strong>r(s) from CPU <strong>to</strong> disk<br />

SEEK Position the read/write head <strong>to</strong> a cylinder<br />

INITIALIZE DRIVE<br />

CHARACTERISTICS<br />

Configure controller for drive<br />

READ ECC BURST ERROR<br />

LENGTH<br />

Read the byte containing ECC data<br />

RAM DIAGNOSTIC Test the controller's RAM buffer<br />

DRIVE DIAGNOSTIC Test the drive-<strong>to</strong>-controller interface<br />

CONTROLLER INTERNAL Perform controller self-test<br />

DIAGNOSTICS<br />

READ LONG Read a sec<strong>to</strong>r and four ECC bytes<br />

WRITE LONG Write a sec<strong>to</strong>r and four ECC bytes<br />

Figure 4-5: S-1410 Controller Commands<br />

<strong>The</strong> process of drive selection is unique from HDC <strong>to</strong> HDC as well as the adapter that<br />

electronically interfaces the HDC <strong>to</strong> the host. FDC drivers are typically more involved<br />

with the additional commands for stepping and seeking while performing a little more<br />

bookkeeping operations. <strong>The</strong>re is also a great more involvement in the format operation<br />

for the FDC driver over the HDC driver.<br />

<strong>The</strong> DOS provides 16 SuperVisor Calls that are used <strong>to</strong> pass operating system function<br />

requests <strong>to</strong> a disk controller - be it an FDC or an HDC. Figure 4-6 reviews these<br />

functions that are detailed in chapter 7. If we try <strong>to</strong> correlate the SVC functions with<br />

the FDC commands, we observe that the DOS provides no facility for requesting a STEP,<br />

STEP OUT, nor a FORCE INTERRUPT. This is not an oversight. <strong>The</strong> force interrupt is a<br />

function that is not needed from a higher level such as the DOS, but would most likely be<br />

usable directly within the FDC driver. Also, since the FDC does its own track stepping<br />

via the SEEK request, the STEP command from the DOS is only needed during the format<br />

operation. <strong>The</strong> DOS limits this <strong>to</strong> STEP IN since the disk only needs <strong>to</strong> be stepped in one<br />

direction during the format operation. <strong>The</strong> remaining SVCs supply the higher level<br />

functions <strong>to</strong> communicate all of the DOS requests <strong>to</strong> the controller.<br />

4-10

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

Saved successfully!

Ooh no, something went wrong!