beautypg.com

Mode 2 interrupt command, Table 19, Miscellaneous cpu control – Zilog Z08470 User Manual

Page 74: Table 19 shows the six general-purpos

background image

Z80 CPU Instructions

UM008007-0715

62

Z80 CPU
User Manual

If Mode 0 is set, the interrupting device can insert any instruction on the data bus and
allow the CPU to execute it. Mode 1 is a simplified mode in which the CPU automatically
executes a restart (RST) at address

0038h

so that no external hardware is required (the old

Program Counter content is pushed onto the stack). Mode 2 is the most powerful because
it allows for an indirect call to any location in memory. With this mode, the CPU forms a
16-bit memory address in which the upper eight bits are the contents of Register I, and the
lower eight bits are supplied by the interrupting device. This address points to the first of
two sequential bytes in a table in which the address of the service routine is located, as
shown in Figure 41. The CPU automatically obtains the starting address and performs a
CALL instruction to this address.

Table 19. Miscellaneous CPU Control

NOP

00

HALT

76

Disable INT (EI)

F3

Enable INT (EI)

FB

Set INT Mode 0
IM0

ED
46

8080A mode

Set INT Mode 1
IM1

ED
56

Call to address 0038h

Set INT Mode 2
IM2

ED
5E

Indirect call using Register I and B bits from
INTER device as a pointer

Figure 41. Mode 2 Interrupt Command

Pointer to Interrupt Table,

Address of Interrupt
Service Routine

Register I is Upper Address,
Peripheral Supplies
Lower Address

This manual is related to the following products: