This commit is contained in:
Irmen de Jong 2020-12-19 03:27:08 +01:00
parent 8b630798d8
commit 168621f7c2

View File

@ -63,6 +63,10 @@ regular subroutines
- subroutine parameters are just variables scoped to the subroutine.
- the arguments passed in a call are evaluated (using the eval-stack if needed) and then
copied into those variables.
This sometimes can seem inefficient but it's required to allow subroutines to work locally
with their parameters and allow them to modify them as required, without changing the
variables used in the call's arguments. If you want to get rid of this overhead you'll
have to make an ``asmsub`` routine in assembly instead.
- the return value is passed back to the caller via cpu register(s):
Byte values will be put in ``A`` .
Word values will be put in ``A`` + ``Y`` register pair.