> On Sep 14, 2015, at 12:53 AM, Mark Pizzolato - Info Comm <m...@infocomm.com> > wrote: > > ... > Paul said: >> parse_addr and fprint_addr are another area that gave me surprises. They >> don't see the switches, so there isn't any way for command switches to >> affect the address printing, which is what I wanted to be able to do. > > The current command's switches are visible via the global sim_switches. > Accessing this variable is done throughout the codebase. How doesn't this > work for you?
It sounds fine. I noticed that simh.doc needs to be updated and made more complete, since a bunch of information in it is incorrect, and a bunch of useful things (like this one) are not mentioned. I'll make a stab at doing some updates and sending the result to this list. Or is there another way to submit work? > Paul said: >> We have a context pointer in >> the device, but not in the unit (I ended up having to abuse the filebuf for >> that). > > Reusing the filebuf could certainly be used for an arbitrary context variable > if it isn't being used otherwise. Alternatively fileref can optionally also > not be a FILE *. When it isn't a FILE *, the unit->dynflags UNIT_NO_FIO flag > should be set. When set, it becomes a unit specific void * which can be used > for context or anything else. Ok. This is another example of something undocumented. > Dave's suggestion seems most reasonable due to the zero impact on the > existing simulators. Can you work with that? It certainly looks that way. Thanks. paul _______________________________________________ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh