<< Previous | Next >>

> LD pd,ps+DE Load Rabbit 4000 Instruction

> Opcode | Instruction | Clocks | Operation
> -- | LD pd,ps+DE | 4 (2,2) | pd = ps + DE
> 6D 06 | LD PW,PW+DE | 4 (2,2) | PW = PW + DE
> 6D 16 | LD PW,PX+DE | PW = PX + DE
> 6D 26 | LD PW,PY+DE | PW = PY + DE
> 6D 36 | LD PW,PZ+DE | PW = PZ + DE
> 6D 46 | LD PX,PW+DE | 4 (2,2) | PX = PW + DE
> 6D 56 | LD PX,PX+DE | PX = PX + DE
> 6D 66 | LD PX,PY+DE | PX = PY + DE
> 6D 76 | LD PX,PZ+DE | PX = PZ + DE
> 6D 86 | LD PY,PW+DE | 4 (2,2) | PY = PW + DE
> 6D 96 | LD PY,PX+DE | PY = PX + DE
> 6D A6 | LD PY,PY+DE | PY = PY + DE
> 6D B6 | LD PY,PZ+DE | PY = PZ + DE
> 6D C6 | LD PZ,PW+DE | 4 (2,2) | PZ = PW + DE
> 6D D6 | LD PZ,PX+DE | PZ = PX + DE
> 6D E6 | LD PZ,PY+DE | PZ = PY + DE
> 6D F6 | LD PZ,PZ+DE | PZ = PZ + DE

> Flags | ALTD | IOI/IOE
> S | Z | L/V | C | F | R | SP | S | D
> - | - | - | - |  | · |  |  |

> #### Description

> Loads pd (any of the 32-bit registers PW, PX, PY or PZ) with the sum of ps (any of PW, PX, PY or PZ) and DE. These instructions cannot be used for general 32-bit arithmetic because the addition depends on the upper two bytes of ps. If the upper two bytes are all ones, then it is 16-bit addition. The following example illustrates this point:

>     ld PW,0xFFFFFFFF
>     ld PW,PW+DE            ;yields PW=0xFFFF0000 if DE=1

>     ld PW,0x7FFFFFFF
>     ld PW,PW+DE            ;yields PW=0x80000000 if DE=1

<< Previous | Next >>