mirror of
https://github.com/irmen/prog8.git
synced 2024-12-26 14:29:35 +00:00
doc
This commit is contained in:
parent
d582d1cc42
commit
6b4896b8f5
@ -642,7 +642,7 @@ Subroutines can be defined in a Block, but also nested inside another subroutine
|
|||||||
With ``asmsub`` you can define a low-level subroutine that is implemented in inline assembly and takes any parameters
|
With ``asmsub`` you can define a low-level subroutine that is implemented in inline assembly and takes any parameters
|
||||||
in registers directly.
|
in registers directly.
|
||||||
|
|
||||||
Trivial subroutines can be tagged as inline to tell the compiler to copy their code
|
Trivial subroutines 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
|
in-place to the locations where the subroutine is called, rather than inserting an actual call and return to the
|
||||||
subroutine. This may increase code size significantly and can only be used in limited scenarios, so YMMV.
|
subroutine. This may increase code size significantly and can only be used in limited scenarios, so YMMV.
|
||||||
|
|
||||||
|
@ -550,7 +550,7 @@ and can have nothing following it. The close curly brace must be on its own line
|
|||||||
The parameters is a (possibly empty) comma separated list of "<datatype> <parametername>" pairs specifying the input parameters.
|
The parameters is a (possibly empty) comma separated list of "<datatype> <parametername>" pairs specifying the input parameters.
|
||||||
The return type has to be specified if the subroutine returns a value.
|
The return type has to be specified if the subroutine returns a value.
|
||||||
The ``inline`` keyword makes their code copied in-place to the locations where the subroutine is called,
|
The ``inline`` keyword makes their code copied in-place to the locations where the subroutine is called,
|
||||||
rather than having an actual call and return to the subroutine. This is meant for trivial subroutines only
|
rather than having an actual call and return to the subroutine. This is meant for very small subroutines only
|
||||||
as it can increase code size significantly.
|
as it can increase code size significantly.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user