mirror of
https://github.com/irmen/prog8.git
synced 2026-04-21 17:16:33 +00:00
documented the romsub bank additions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user