This page describes the following instruction:
- Group: PAIR
- Mnemonic: lc
- Opcode: 175d, AFh
- Encoding: 1_010_1111b (PAIR_SRC_DST)
- Pseudo-code: pc++; i=pc; pc=0; co=c; c=ram[l][o]; l--
- L:LOCAL C:CALL
- Source is the memory cell at page L offset O.
-
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 'L' source is the value of a memory cell in the L-page. See Page Registers for more information on the three page register (D, L, C). 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.