[Simh] Custom PC formatting

Mark Pizzolato - Info Comm Mark at infocomm.com
Sun Oct 6 14:48:33 EDT 2013


On Sunday, October 06, 2013 at 10:39 AM, Peter Onion wrote:
> > No problem, we are now narrowing in on the right question.
> >
> > To address this issue, your simulator should provide a
> "sim_vm_fprint_addr" routine.  This routine has a signature of:
> >
> > void sim_vm_fprint_addr (FILE *st, DEVICE *dptr, t_addr addr);
> >
> > The LGP simulator uses this interface.  Look there for details.
> >
> > - Mark
> >
> 
> I'll give it a try, but I fear that is not going to be the right answer
> because normal addresses (as in the address field in instructions) are
> only 13 bits and don't have the "half bit" at the least significant end.
> It is only the SCR that has the extra bit.
> 
> The machine has 8K words, but 16K instructions !

If that does not work for reasons you've just described, then there are still a couple more approaches:
 
One alternative might be to leverage the SIM_SW_STOP flag switches which your fprint_sym routine will be invoked with when the simulator stops execution.

The last alternative would be for your sim_instr routine can handle any/all message generation prior to returning to the scp framework and set the SCPE_NOMESSAGE bit in the return status.  This will suppress scp's message generation for any command which invokes run_cmd (i.e. START, RUN, GO, STEP, etc.).  

This may be messier depending on the set of conditions you exit sim_instr with.  You may want to copy  parts of run_cmd_message and fprintf_stopped_gen from scp.c to implement your message generation.

- Mark




More information about the Simh mailing list