![]() |
|
| << Previous | Next >> | |
| | |
LD pd,ps+HL Load Rabbit 4000/5000 Instruction
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 HL. 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+HL ;yields PW=0xFFFF0000 if HL=1ld PW,0x7FFFFFFF
ld PW,PW+HL ;yields PW=0x80000000 if HL=1
| Rabbit Instructions | << Previous | Next >> | rabbit.com |