CALL and RET
ondel
Posts: 4
in Propeller 1
Hallo,
I have a short question:
What is wrong in this ASM code segment? I use the PARALLAX EDITOR/ DEVELOPMENT-System Version 1.3.2
.....
call #mark1
.. do something in ASM code
call #mark1
....
' Routine for call
mark1 nop
mark2 ret
--> Error sign: undefined ?_RET symbol
Thanks for your help.
Heiko
I have a short question:
What is wrong in this ASM code segment? I use the PARALLAX EDITOR/ DEVELOPMENT-System Version 1.3.2
.....
call #mark1
.. do something in ASM code
call #mark1
....
' Routine for call
mark1 nop
mark2 ret
--> Error sign: undefined ?_RET symbol
Thanks for your help.
Heiko
Comments
It was my mistake!
The reason for the special form of return label is because there is no call stack in the Propeller chip but instead it uses a jump instruction that modifies the _ret labelled instruction to jump back to the correct spot. Read about CALL in the Assembly Language Reference section of the Propeller manual for a better understanding.
Here though is an excerpt from it: