<< Previous | Next >>

> LD pd,ps+IY Load Rabbit 4000 Instruction

> Opcode | Instruction | Clocks | Operation
> -- | LD pd,ps+IY | 4 (2,2) | pd = ps + IY
> 6D 05 | LD PW,PW+IY | 4 (2,2) | PW = PW + IY
> 6D 15 | LD PW,PX+IY | PW = PX + IY
> 6D 25 | LD PW,PY+IY | PW = PY + IY
> 6D 35 | LD PW,PZ+IY | PW = PZ + IY
> 6D 45 | LD PX,PW+IY | 4 (2,2) | PX = PW + IY
> 6D 55 | LD PX,PX+IY | PX = PX + IY
> 6D 65 | LD PX,PY+IY | PX = PY + IY
> 6D 75 | LD PX,PZ+IY | PX = PZ + IY
> 6D 85 | LD PY,PW+IY | 4 (2,2) | PY = PW + IY
> 6D 95 | LD PY,PX+IY | PY = PX + IY
> 6D A5 | LD PY,PY+IY | PY = PY + IY
> 6D B5 | LD PY,PZ+IY | PY = PZ + IY
> 6D C5 | LD PZ,PW+IY | 4 (2,2) | PZ = PW + IX
> 6D D5 | LD PZ,PX+IY | PZ = PX + IX
> 6D E5 | LD PZ,PY+IY | PZ = PY + IX
> 6D F5 | LD PZ,PZ+IY | PZ = PZ + IX

> 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 IY. 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+IY            ;yields PW=0xFFFF0000 if IY=1

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

<< Previous | Next >>