[Simh] Printing and parsing registers

J. David Bryan jdbryan at acm.org
Sat Sep 12 16:28:12 EDT 2015


On Saturday, September 12, 2015 at 15:46, Bob Supnik wrote:

> ...including flags added to their proper spot, the flags field. 
> 
> [...]  However, I think it's cleaner, in general, to put flags where
> they belong...

I may not have been clear that I'm proposing to add user flags to the upper 
part of the REG structure flags field, in the same way that user-defined 
device and unit flags are allowed in the upper parts of their respective 
fields.

The bit about passing them in the unused upper part of the radix parameter 
is just a way of avoiding changes to all of the existing simulators.  They 
certainly could be passed in a separate parameter if that's not a concern.  
Or passing a REG pointer via the uptr parameter and using that to access 
user-defined flags within the flags field would work.


> ...and find a way to let the print/parse routines know what register
> they're working on if REG_VMIO is set. 

Ay, there's the rub.  :-)  I've not come up with a robust way of 
identifying a register other than placing some sort of ID within in the 
register structure itself.

                                      -- Dave



More information about the Simh mailing list