[Simh] Byte capacity

Bob Supnik bob at supnik.org
Sun May 30 14:45:36 EDT 2010


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, simh-request at trailing-edge.com wrote:
> Send Simh mailing list submissions to
> 	simh at trailing-edge.com
>
> 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
> 	simh-request at trailing-edge.com
>
> You can reach the person managing the list at
> 	simh-owner at trailing-edge.com
>
> 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"<robert.jarratt at ntlworld.com>
> Subject: [Simh] Simulated disk size
> To:<simh at trailing-edge.com>
> Message-ID:<01bf01caff80$0615cff0$12416fd0$@jarratt at ntlworld.com>
> 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
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh
>
> End of Simh Digest, Vol 78, Issue 15
> ************************************
>
>    



More information about the Simh mailing list