122-32000 Parallax Inc, 122-32000 Datasheet - Page 360

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
CALL
Instruction: Jump to address with intention to return to next instruction.
CALL
Result: PC + 1 is written to the s-field of the register indicated by the d-field.
Explanation
CALL
at Address should eventually execute a
instruction following the
The Propeller does not use a call stack, so the return address is stored in a different manner; it
is recorded at the location of the routine’s
assembler searches for a label that is Address with “_ret” appended to it. It then encodes the
address of the label Address
to jump to. At run time, when executing the
address (PC + 1) into the source field of the “
to Address. See the example below:
Routine
Routine_ret
In this example, the first instruction is a call to
label called
instruction. At run time, when executing the
of
Page 360 · Propeller Manual v1.0
–INSTR– ZCRI –CON–
010111 0011 1111 ????????? sssssssss
<other code here
records the address of the next instruction (PC + 1) then jumps to Address. The routine
#Address
Address (s-field) is the register or 9-bit literal whose value is the address to jump to.
– Assembly Language Reference
Routine_ret
> into the source field of the instruction at
call
<other code here>
<more code>
.
.
.
ret
–DEST–
CALL
and encodes its address as well as
_ret
).
Routine
into the
–SRC–
RET
CALL
RET
instruction to return to the recorded address (the
CALL
RET
instruction as well as the Address you specified
CALL
command itself. For the
Result = 0
Routine
Z Result
” instruction at Address
instruction, the cog first writes the address
instruction, the cog first stores the return
. The assembler searches for another
Routine
C Result
Routine_ret
---
’s address into the
_ret
CALL
Written
Result
, then jumps to
and then jumps
instruction, the
Clocks
4
CALL

Related parts for 122-32000