3.3.8 Input/Output Instructions

The Rabbit uses an entirely different scheme for accessing input/output devices. Any memory access instruction may be prefixed by one of two prefixes, one for internal I/O space and one for external I/O space. When so prefixed, the memory instruction is turned into an I/O instruction that accesses that I/O space at the I/O address specified by the 16- bit memory address used. For example

IOI LD A,(0x85) ; loads A register with contents

; of internal I/O register at location 0x85.

LD IY,0x4000

IOE LD HL,(IY+5) ; get word from external I/O location 0x4005

By using the prefix approach, all the 16-bit memory access instructions are available for reading and writing I/O locations. The memory mapping is bypassed when I/O operations are executed.

I/O writes to the internal I/O registers require only two clocks, rather than the minimum of three clocks required for writes to memory or external I/O devices.

User’s Manual

39

Page 48
Image 48
Jameco Electronics 3000, 2000 manual Input/Output Instructions