The same way SCP does it:

(dptr->dwidth + CHAR_BIT - 1) / CHAR_BIT

You can just use 7 and 8 for constants, if you prefer.

/Bob

On 5/30/2010 12:00 PM, [email protected] wrote:
> Send Simh mailing list submissions to
>       [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       http://mailman.trailing-edge.com/mailman/listinfo/simh
> or, via email, send a message with subject or body 'help' to
>       [email protected]
>
> You can reach the person managing the list at
>       [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Simh digest..."
>
>
> Today's Topics:
>
>     1.  Simulated disk size (Rob Jarratt)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 29 May 2010 23:41:00 +0100
> From: "Rob Jarratt"<[email protected]>
> Subject: [Simh] Simulated disk size
> To:<[email protected]>
> Message-ID:<01bf01caff80$0615cff0$12416f...@[email protected]>
> Content-Type: text/plain; charset="us-ascii"
>
> I have recently discovered that my difference disk code does not work well
> with all simulated disks. I had tested it with the RQ disks in the VAX 780
> emulation. Recently I have had occasion to try the PDP 11 simulation and I
> have discovered that my code does not work with RP disks. This is because I
> rely on the capac field in the sim_unit structure. From what I can tell this
> field is the number of bytes for an RQ disk, but the number of 16-bit words
> for an RP. Is there a consistent way for me to discover the size of a
> simulated disk in bytes?
>
> Regards
>
> Rob
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://mailman.trailing-edge.com/pipermail/simh/attachments/20100529/10afb6ba/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> Simh mailing list
> [email protected]
> http://mailman.trailing-edge.com/mailman/listinfo/simh
>
> End of Simh Digest, Vol 78, Issue 15
> ************************************
>
>    
_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to