dal manuale dello Z80:
HALT Exit
When a software HALT instruction is executed, the CPU executes NOPs until an
interrupt
is received (either a nonmaskable or a maskable interrupt while the interrupt
flip-flop is
enabled). The two interrupt lines are sampled with the rising clock edge during
each T4
state as depicted in Figure 11. If a nonmaskable interrupt is received or a
maskable interrupt is received and the interrupt enable flip-flop is set, then
the HALT state is exited on
the next rising clock edge. The following cycle is an interrupt acknowledge
cycle corresponding to the type of interrupt that was received. If both are
received at this time, then
the nonmaskable interrupt is acknowledged because it is the highest priority.
The purpose
of executing NOP instructions while in the HALT state is to keep the memory
refresh signals active. Each cycle in the HALT state is a normal M1 (fetch)
cycle except that the data
received from the memory is ignored and an NOP instruction is forced internally
to the
CPU. The HALT acknowledge signal is active during this time indicating that the
processor is in the HALT state.
Non c'è distinzione tra INT e NMI, tranne che l'INT può essere disabilitato e
che nel caso dei due segnali attivi contemporanemente, viene eseguita la
routine dell'NMI perchè ha priorità più alta.
ciao
Mario
Il 12/01/2023 13:35 Valerio Messina <dmarc-noreply@xxxxxxxxxxxxx> ha scritto:
ciao,
quando uno Z80 va in HALT e poi riceve un NMI, immagino che lo serve
comunque, ma quando esce dalla ISR, lo stato HALT viene ripristinato?
C'è una issue aperta sul repository dell'emulatore 'z80emu' che è quello
usato di default in Wilderland:
https://github.com/anotherlin/z80emu/issues/9
Se ne sapete qualcosa, vi ringrazio,
--
Valerio