This page describes the following instruction:
- Group: PAIR
- Mnemonic: rc
- Opcode: 207d, CFh
- Encoding: 1_100_1111b (PAIR_SRC_DST)
- Pseudo-code: pc++; i=pc; pc=0; co=c; c=r; l--
- R:RESULT C:CALL
- Source is the R register.
-
Save the content of the Code Page register C into the Coroutine register CO.
Set the Program Counter register to zero.Set the Code Page register C to the source value.
Decrement the Local Page register L.
The 'C' destination takes the source value as a page index, which it uses as the destination for subroutine call. Decrementing L creates a new stack frame page. The previous stackframe can be resumed by executing 'RET'. Observe that I gets overwritten (with the return address offset) during 'CALL'. The code page of the caller is saved into the Coroutine register. The subroutine will typically execute 'OWN', which copies the value of the Coroutine register into the subroutine's local page at L7. See Subroutines for details on this.