Zilog Z08470 User Manual
Page 141
![background image](https://www.manualsdir.com/files/771211/content/doc141.png)
< %27 2GTKRJGTCNU
7UGT /CPWCN
UM008101-0601
Direct Memory Access
5.
ENABLE AFTER RETI
command
6.
ENABLE DMA
command
•
•
•
7.
RETI
instruction
Interrupts at end-of-block, for example, might occur when reading a
floppy disk. If the disk transfers 128-byte records, the DMA can be made
to interrupt at the end of each record to notify the CPU of its completion.
Then the CPU can read the destination (memory) address counter to find
the last memory location filled. See Table 12 for address-counter
contents. A service routine for continuing inputs to contiguous locations
of memory typically contains the
CONTINUE
,
REINITIALIZE STATUS
BYTE
, and
ENABLE DMA
commands before the CPU’s return from
interrupt. A service routine for shutting down the DMA after the record
arrives typically includes
DISABLE DMA
and
REINITIALIZE STATUS
BYTE
commands. If the DMA transfer is started by an interrupt from
another device, the service routine for that other device includes an
ENABLE DMA
command written to the DMA’s port address.
Interrupts on byte match (a search or transfer/search operation) can be
implemented so that any ending byte, error indicator, or other character
causes the interrupt. This procedure frees the CPU from looking for these
characters in a stream of data, increases throughput, and reduces CPU
software complexity. For example, the DMA might search for end-of-text
(EXT) characters or carriage returns in a communications environment and
interrupt the CPU only when the complete message frame has arrived. The
service routines for this would be very much like those for interrupts on
end-of-block.
Interrupts on Ready are somewhat different. First, the DMA cannot be the
bus master before the interrupt because the CPU only senses interrupts
when the CPU is the bus master (the other types of interrupts are not