Netronics Explorer/85 monitor step execution

The ROM monitor of the Netronics Explorer/85 computer allows the step by step execution of a user program. This is implemented with the help of the 8155 timer and the trap interrupt line of the 8085: the timer is set with a count such when the first user program instruction is executed, the processor is interrupted and the monitor kicks in to show part of the execution environment.

I don’t own the original hardware at this moment, but I would like to ask to somebody that owns it if this functionality really works.

My question pops up because I cannot make this work in an emulated environment, since the timer is being programmed with 197 cycles, but the launch function for the user program takes 211 cycles, so the program is always interrupted before starting the execution of the user program. In the monitor program listing you can find online, you can see that somebody else also annotated this, so I’m really curious in knowing if this feature ever worked correctly without patching the ROM:

Thanks in advance!

Welcome! That’s an interesting discrepancy - certainly the tactic of setting a timer to interrupt after a single instruction is a technique I’ve heard of before, and has surely been used, although I can’t give an example.

If you hadn’t shown the listing, I would think the discrepancy is in the emulation - it’s not unusual for emulators to have bugs, including bugs in timing, especially for CPUs with some complexity about how long instructions will take. And the emulation needs also to be accurate in modelling the way the timer is programmed, the way it counts, the way it produces an interrupt, and the way the interrupt is handled. It’s possible for a few clocks to be miscounted along the way.

But, with that listing, I do wonder. One possibility is that the person with the pencil, counting cycles, is making the same error as the emulator. Another is, as you suggest, that the program as listed is incorrect. I’m not sure how we’d distinguish.