LDP HL,(mn)
LDP IX,(mn)
LDP IY,(mn)
Load Physical
Rabbit 2000/3000/4000 Instruction
|
|
ED 6D n m
|
LDP HL,(mn)
|
|
L = (mn)
H = (mn + 1)
(Addr[19:16] = A[3:0])
|
|
DD 6D n m
|
LDP IX,(mn)
|
|
IXlow = (mn)
IXhigh = (mn + 1)
(Addr[19:16] = A[3:0])
|
|
FD 6D n m
|
LDP IY,(mn)
|
|
IYlow = (mn)
IYhigh = (mn + 1)
(Addr[19:16] = A[3:0])
|
Description
These instructions are used to access 20-bit addresses. In all cases, the four most significant bits of the 20-
bit address (bits 19 through 16) are defined as the four least significant bits of A (bits 3 though 0). The
LDP instructions bypass the MMU's address translation unit for direct access to the 20-bit memory
address space.
-
LDP HL,(mn): Loads L with the data whose 16 least significant bits of its 20-bit address are the 16-bit constant mn, and then loads H with the data in the following 20-bit address.
-
LDP IX,(mn): Loads the low-order byte of IX with the data whose 16 least significant bits of its 20-bit address are the 16-bit constant mn, and then loads the high-order byte of IX with the data in the following 20-bit address.
-
LDP IY,(mn): Loads the low-order byte of IY with the data whose 16 least significant bits of its 20-bit address are the 16-bit constant mn, and then loads the high-order byte of IY with the data in the following 20-bit address.
Note that the LDP instructions wrap around on a 64K page boundary. Since the LDP instruction operates
on two-byte values, the second byte wraps around and is written at the start of the page if you try to read or
write across a page boundary. Thus, if you fetch or store at address 0xn,0xFFFF, you will get the bytes
located at 0xn, 0xFFFF and 0xn,0x0000 instead of 0xn,0xFFFF and 0x(n+1)0x0000 as you might expect.
Therefore, do not use LDP at any physical address ending in 0xFFFF.