Skip to content

Function

Kannagi edited this page Mar 18, 2024 · 4 revisions

Some things to know :

  • the number of arguments is limited to 8.
  • the return always writes on the accumulator
  • If a variable is declared in a function, it will be allocated.
  • If a variable is outside of a function then it will be in the .bss segment.

func the arguments are allocated
funcspm the arguments are in the spm
funclib the arguments are in the lib
proc function that has no return

call allows you to call a function
return allows you to return a value (only in the accumulator)

Clone this wiki locally