[Simh] Byte capacity
Bob Supnik
bob at supnik.org
Sun May 30 20:41:20 EDT 2010
Sorry, I missed a term
(((dptr->dwidth / dptr->aincr) + CHAR_BIT - 1) / CHAR_BIT) * uptr->capac
is what you want.
The RP, as a 16b Massbus disk, is defined as having 16b <words> with an
address increment of 1. The sectors are viewed as 256 * 16b words.
The RQ is defined as having 8b bytes. But to get it to display properly
(16b wide), it is defined as having 16b words with an address increment
of 2. The sectors are addressed as 512 * 8b bytes but are displayed as
256 * 16b words, just like PDP-11 main memory.
So for the RP, the equation evaluates as (((16 / 1) + 7) / 8) = 2 *
uptr->capac; that is, convert 16b words to 8b bytes.
For the RQ, the equation evaluates as (((16 / 2) + 7) / 8) = 1 *
utpr->capac; that is, 8b bytes stay as 8b bytes.
The reason for all this hair to deal with processors (and peripherals)
where the display width is not the same as the basic unit of memory
addressability.
/Bob
On 5/30/2010 5:28 PM, Rob Jarratt wrote:
> (dptr->dwidth + CHAR_BIT - 1) / CHAR_BIT
>
More information about the Simh
mailing list