<< Previous | Next >>

> CALL mn Call Subroutine Rabbit 2000/3000/4000 Instruction

> Opcode | Instruction | Clocks | Operation
> CD n m | CALL mn | 12 (2,2,2,3,3) | (SP - 1) = PChigh (SP - 2) = PClow PC = mn SP = SP - 2

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

> #### Description

> This instruction is used to call a subroutine. First PC is pushed onto the stack. The high-order byte of PC is pushed first, then the low-order byte. PC is then loaded with mn, which is the16-bit address of the first instruction of the subroutine. SP is updated to reflect the two bytes pushed onto the stack.

> The Dynamic C assembler recognizes the instruction

>     CALL label

> where mn is coded as a `label`.

<< Previous | Next >>