From de5ce0f51524720c72deb331d398a5c1bfeba831 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sun, 2 Jul 2023 06:13:22 +0200 Subject: [PATCH] tiny optimization and doc --- docs/source/programming.rst | 2 +- docs/source/syntaxreference.rst | 3 ++- examples/cx16/pcmaudio/stream-wav.p8 | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/programming.rst b/docs/source/programming.rst index 3eb19fa86..105ccb783 100644 --- a/docs/source/programming.rst +++ b/docs/source/programming.rst @@ -20,7 +20,7 @@ Module A module file can *import* other modules, including *library modules*. Comments - Everything after a semicolon ``;`` is a comment and is ignored by the compiler. + Everything after a semicolon ``;`` is a comment and is ignored by the compiler. There is no block-comment. If the whole line is just a comment, this line will be copied into the resulting assembly source code for reference. Directive diff --git a/docs/source/syntaxreference.rst b/docs/source/syntaxreference.rst index 722c14955..9a16341e9 100644 --- a/docs/source/syntaxreference.rst +++ b/docs/source/syntaxreference.rst @@ -20,7 +20,8 @@ You can use tabs or spaces as you wish. Source code comments ^^^^^^^^^^^^^^^^^^^^ -Everything after a semicolon ``;`` is a comment and is ignored. +Everything after a semicolon ``;`` is a comment and is ignored. There is no block-comment so just +comment out each individual line if you want to comment out a bunch of them. If the whole line is just a comment, it will be copied into the resulting assembly source code. This makes it easier to understand and relate the generated code. Examples:: diff --git a/examples/cx16/pcmaudio/stream-wav.p8 b/examples/cx16/pcmaudio/stream-wav.p8 index 6de700d4b..ca07d8293 100644 --- a/examples/cx16/pcmaudio/stream-wav.p8 +++ b/examples/cx16/pcmaudio/stream-wav.p8 @@ -189,8 +189,7 @@ interrupt { ldx #4 - ldy #0 - lda (cx16.r0),y - sec - sbc #128 ; convert to signed + eor #$80 ; convert to signed 8-bit sta cx16.VERA_AUDIO_DATA iny bne -