From 64a411628d0df8964c99e83c848c67feb35b1d86 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 27 Nov 2021 19:58:08 +0100 Subject: [PATCH] doc fixes --- docs/source/programming.rst | 4 ++-- docs/source/syntaxreference.rst | 10 +++++----- docs/source/targetsystem.rst | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/source/programming.rst b/docs/source/programming.rst index 30c667e0a..9604db5d1 100644 --- a/docs/source/programming.rst +++ b/docs/source/programming.rst @@ -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 diff --git a/docs/source/syntaxreference.rst b/docs/source/syntaxreference.rst index 02ef080de..49718d6c4 100644 --- a/docs/source/syntaxreference.rst +++ b/docs/source/syntaxreference.rst @@ -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 diff --git a/docs/source/targetsystem.rst b/docs/source/targetsystem.rst index 58bd52292..991a3f8f3 100644 --- a/docs/source/targetsystem.rst +++ b/docs/source/targetsystem.rst @@ -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