8

I was reading the Z80's official manual by Zilog, and there's a passage in the description for the BUSREQ pin that states "Bus Request contains a higher priority than NMI and is always recognized at the end of the current machine cycle".

It got me thinking though, is it possible to use the BUSREQ as an NMI, if for some reason the NMI pin is unavailable (e.g. burned out) and if so, how could that be done?

2 Answers 2

25

A hardware interrupt changes the Program Counter (PC) so that a CPU executes instructions from a specific address, where an interrupt service routine (ISR) is located.

The Z80 Bus Request /BUSREQ doesn't change the PC. Instead, the Z80 suspends execution and tri-states its address/data/control buses.

After /BUSREQ is negated, the Z80 carries on and executes the next instruction.

The /WAIT pin also stops execution, with effectively higher priority than the interrupts, but also has nothing to do with generating interrupts.

I think you're looking too deeply into the simple statement "Bus Request contains a higher priority than NMI and is always recognized at the end of the current machine cycle" and seeing a meaning and possibilities that aren't there.

22

The purpose of NMI is to cause the Z80 to execute code located at the NMI handler. The purpose of Bus Request is to prevent the Z80 from executing any code until whatever wanted the bus is done with it, but not affect the sequences of instructions and memory operations performed by Z80.

By way of analogy, think of NMI as being a light-up "detour" sign and Bus Request as being an ordinary traffic signal. When Bus Request indicates that the Z80 should get off the bus as soon as possible, it can't stop any car which is in the intersection or too close through it, but it will be "recognized" once all cars that will go through before the next green light have done so.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .