Date : Tue, 21 Feb 1989 10:36:38 PST
From : Bridger Mitchell <bridger%rcc@rand.org>
Subject: CP/M-Plus Disk Access
>>However, I am still having problems setting up a buffer properly. To
>>perform a disk access (say, a READ for this example) I make the
>>following calls to the BIOS via the BDOS: SETBNK, SELDISK, SETTRACK,
>>SETSECTOR, SETDMA, READ. The result is that floppy drive turns on
>>briefly, then turns off, and the buffer I specified by the SETDMA call
>>does not contain data that I know are in the disk sector I specified.
Some suggestions that may help in directly reading a disk under
CP/M Plus:
Call SETBNK with A=1 to set the TPA bank.
Call SECTRAN.
Does the READ return with good status? Is the data in your buffer
changed after the READ? Remember that in CP/M Plus the bios does
*physical* sector io; you must have a full sector-sized buffer and do
the deblocking in the application. CPM22RSX (or a similar name) is a
tool for helping with this.
The SCB (system control block) is mostly documented in the manual, but
you don't need or want it for this purpose. It is in common memory,
and is used for BIOS and BDOS parameters (e.g. current DMA address),
configuration bytes, messages between the CCP and the BDOS, etc.
Unless you *really* know the system's innards, treat it as strictly
read-only!
--bridger