<< Previous | Next >>

> ALTD Alternate Destination Rabbit 2000/3000/4000 Instruction

> Opcode | Instruction | Clocks | Operation
> 76 | ALTD | 2 | Sets alternate register destination for following instruction.

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

> #### Description

> This instruction prefix causes the instruction immediately following it to affect:

> - the alternate flags, which is signified by "·" in the "F" column in the table above; or
> - the alternate registers for the destination of the data, signified by "·" in the "R" column; or
> - both of the above; or
> - the instruction is not affected.

> ALTD also causes special alternate register uses that are unique to some instructions (signified by "·" in the "SP" column). The instructions are:

>     EX BC,HL
>     EX DE,HL
>     EX JK',HL
>     EX BC',HL
>     EX DE',HL

> How ALTD affects an instruction is noted in the Flags table for that instruction.

> #### Example

> The instruction: "ALTD ADD HL,DE" would add DE to HL and store the result in the alternate register HL' instead of in HL. In the information for "ADD HL,DE" both the columns "F" and "R" are marked, meaning that not only is the alternate register used, but so is the alternate flag.

> The instructions "ALTD LD DE,BC" and "LD DE',BC" both load the data in BC into the alternate register DE' because the Dynamic C assembler recognizes them as the same instruction.

<< Previous | Next >>