![background image](http://html2.mh-extra.com/html/rabbit/2000/2000_user-manual_3110256030.webp)
24
Rabbit 2000 Microprocessor
3.3.3 Load or Store Data Using an Index Register
An index register is a 16-bit register, usually IX, IY, SP or HL, that is used for the address
of a byte or word to be fetched from or stored to memory. Sometimes an 8-bit offset is
added to the address either as a signed or unsigned number. The 8-bit offset is a byte in the
instruction word. BC and DE can serve as index registers only for the special cases below.
LD A,(BC)
LD A',(BC)
LD (BC),A
LD A,(DE)
LD A',(DE)
LD (DE),A
Other 8-bit loads and stores are the following.
LD r,(HL) ; r is any of 7 registers A, B, C, D, E, H, L
LD g,(HL) ; same but alternate register destination
LD (HL),r ; r is any of the 7 registers above
; or an immediate data byte
** LD (HL),g ;**** not a legal instruction!
LD r,(IX+d) ; r is any of 7 registers, d is -128 to +127 offset
LD g,(IX+d) ; same but alternate destination
LD (IX+d),r ; r is any of 7 registers or an immediate data byte
LD (IY+d),r ; IX or IY can have offset d
The following are 16-bit indexed loads and stores. None of these instructions exists on the
Z180 or Z80. The only source for a store is
HL
. The only destination for a load is
HL
or
HL
'
.
LD HL,(SP+d) ; d is an offset from 0 to 255.
; 16-bits are fetched to HL or HL'
LD (SP+d),HL ; corresponding store
LD HL,(HL+d) ; d is an offset from -128 to +127,
; uses original HL value for addressing
; l=(HL+d), h=(HL+d+1)
LD HL',(HL+d)
LD (HL+d),HL
LD (IX+d),HL ; store HL at address pointed to
; by IX plus -128 to +127 offset
LD HL,(IX+d)
LD HL',(IX+d)
LD (IY+d),HL ; store HL at address pointed to
; by IY plus -128 to +127 offset
LD HL,(IY+d)
LD HL',(IY+d)
Содержание 2000
Страница 1: ...Rabbit 2000 Microprocessor User s Manual 019 0069 041018 M...
Страница 12: ...6 Rabbit 2000 Microprocessor...
Страница 46: ...40 Rabbit 2000 Microprocessor...
Страница 54: ...48 Rabbit 2000 Microprocessor...
Страница 76: ...70 Rabbit 2000 Microprocessor...
Страница 96: ...90 Rabbit 2000 Microprocessor...
Страница 142: ...136 Rabbit 2000 Microprocessor...
Страница 154: ...148 Rabbit 2000 Microprocessor...
Страница 170: ...164 Rabbit 2000 Microprocessor...
Страница 174: ...168 Rabbit 2000 Microprocessor...
Страница 180: ...174 Rabbit 2000 Microprocessor...
Страница 202: ...196 Rabbit 2000 Microprocessor...
Страница 206: ...200 Rabbit 2000 Microprocessor...
Страница 226: ......
Страница 230: ...224 Rabbit 2000 Microprocessor...