Changes

Jump to: navigation, search

Some features of the Z80

No change in size, 21:45, 29 December 2018
/* IFF0 and IFF1 */ --> IFF1 and IFF2 are official names found in all Zilog Z80 datasheets
* If the LDIR/LDDR opcode is overwritten by itself then command execution will stop. Effectively, the LDIR opcode is repeatidly fetched and decoded for each byte fetched from memory.
== IFF0 and IFF1 and IFF2 ==IFF0 IFF1 reflects the state of the maskable interrupt. The maskable interrupt can be enabled using the Z80 instruction "EI" and disabled using the Z80 instruction "DI". When IFF0 IFF1 is "1" masked interrupts are enabled, when a interrupt request is received by the Z80 it will be acknowledged and the interrupt handler executed. When IFF0 IFF1 is "0" masked interrupts are disabled, any interrupt requests are ignored.
When a non-maskable interrupt (NMI) is executed by the Z80, IFF1 IFF2 is set to the value of IFF0IFF1. Then IFF0 IFF1 is set to "0" to disable maskable interrupts. The NMI handler will be executed.When a "RETN" instruction is executed by the Z80, IFF0 IFF1 is set to the value in IFF1IFF2, therefore the maskable interrupt state is restored. The state of IFF0 IFF1 can be set at any time using the "DI" and "EI" instructions.
== IM 0, IM 1, IM 2 ==
20
edits