[Simh] Handling Flags in SIMH

J. David Bryan jdbryan at acm.org
Sun Jul 31 23:31:59 EDT 2011


On Sunday, July 31, 2011 at 23:09, I wrote:

> As it is written, you're clearing bits 16 and 17 of the flags word but
> then setting bit 0 (instead of bit 16).

I should amplify that even though you're setting the values correctly in 
your validation routine (EPROM_config), when you return SCPE_OK, SIMH is 
using the values in your MTAB entry to AND and OR the unit flags word.  
That's why the unit flags are set correctly just before you exit and are 
cleared when you reenter.

Note also that regular MTABs only modify unit flags.  If you want to modify 
device flags, you must use the MTAB_XTD and MTAB_VDV options on the MTAB 
entry and provide a validation routine that changes the device flags 
explicitly.

                                      -- Dave




More information about the Simh mailing list