This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Invoking a function

An assembly question here.

Whenever we want to invoke a function, say "TESTING", we would have to use the commands like CALL, JMP ...ETC..


TESTING:
MOV R0,#33
;
;
;

Is it possible that a function is invoked without using any of the instruction sets like CALL, JMP...etc

The problem i'm facing is, as i'm looking through the code written by my senior, i found some functions that isnt invoked by any instruction sets.

I've confirmed this because i've search thru the code using search function and the result that contain the function's name is only in the function itself.

Parents
  • It is not entirely uncommon for developers to leave unused routines laying about.

    "Is it possible that a function is invoked without using any of the instruction sets like CALL, JMP...etc"

    Sure, push the function address on the stack and RET, but you'd think that the instructions to push the address would still use the function name.

Reply
  • It is not entirely uncommon for developers to leave unused routines laying about.

    "Is it possible that a function is invoked without using any of the instruction sets like CALL, JMP...etc"

    Sure, push the function address on the stack and RET, but you'd think that the instructions to push the address would still use the function name.

Children
No data