mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 16:29:21 +00:00
doc fixes
This commit is contained in:
parent
e8e25c6fd6
commit
64a411628d
@ -640,8 +640,8 @@ Defining a subroutine
|
||||
Subroutines are parts of the code that can be repeatedly invoked using a subroutine call from elsewhere.
|
||||
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 in inline assembly and takes any parameters
|
||||
in registers directly.
|
||||
With ``asmsub`` you can define a low-level subroutine that is implemented directly in assembly and takes parameters
|
||||
directly in registers.
|
||||
|
||||
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
|
||||
|
@ -194,12 +194,12 @@ Directives
|
||||
.. data:: %asm {{ ... }}
|
||||
|
||||
Level: not at module scope.
|
||||
Declares that there is *inline assembly code* in the lines enclosed by the curly braces.
|
||||
This code will be written as-is into the generated output file.
|
||||
The assembler syntax used should be for the 3rd party cross assembler tool that Prog8 uses.
|
||||
Declares that a piece of *assembly code* is inside the curly braces.
|
||||
This code will be copied as-is into the generated output assembly source file.
|
||||
The assembler syntax used should be for the 3rd party cross assembler tool that Prog8 uses (64tass).
|
||||
Note that the start and end markers are both *double curly braces* to minimize the chance
|
||||
that the inline assembly itself contains either of those. If it does contain a ``}}``,
|
||||
the parsing of the inline assembler block will end prematurely and cause compilation errors.
|
||||
that the assembly code itself contains either of those. If it does contain a ``}}``,
|
||||
it will confuse the parser.
|
||||
|
||||
|
||||
Identifiers
|
||||
|
@ -148,7 +148,7 @@ For the C64 these routines are::
|
||||
c64.set_rasterirq(uword handler_address, uword rasterline, boolean useKernal)
|
||||
c64.restore_irq() ; set everything back to the systems default irq handler
|
||||
|
||||
And for the Commander X16:
|
||||
And for the Commander X16::
|
||||
|
||||
cx16.set_irq(uword handler_address, boolean useKernal) ; vsync irq
|
||||
cx16.set_rasterirq(uword handler_address, uword rasterline) ; note: disables kernal irq handler! sys.wait() won't work anymore
|
||||
|
Loading…
Reference in New Issue
Block a user