documented the romsub bank additions

This commit is contained in:
Irmen de Jong
2024-11-03 20:39:44 +01:00
parent 0fc9aa6b2d
commit cb47e2c149
7 changed files with 62 additions and 29 deletions
+2 -1
View File
@@ -805,7 +805,8 @@ Subroutines are parts of the code that can be repeatedly invoked using a subrout
Their definition, using the ``sub`` statement, includes the specification of the required parameters and return value.
Subroutines can be defined in a Block, but also nested inside another subroutine. Everything is scoped accordingly.
With ``asmsub`` you can define a low-level subroutine that is implemented directly in assembly and takes parameters
directly in registers.
directly in registers. Finally with ``romsub`` you can define an external subroutine that's implemented outside
of the program (for instance, a ROM routine, or a routine in a library loaded elsewhere in RAM).
Trivial ``asmsub`` routines can be tagged as ``inline`` to tell the compiler to copy their code
in-place to the locations where the subroutine is called, rather than inserting an actual call and return to the