aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-02-03 21:42:48 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-02-03 21:49:34 +0100
commit63e23a3d74d3560ee0635d32961fd9c205890f05 (patch)
treebb0012bfe04776b206bb62dda54f7056e5446e11 /include
parent186b9d5c719951f4e84048b6b4a7bc937461033e (diff)
downloadjetpac.nes-63e23a3d74d3560ee0635d32961fd9c205890f05.tar.gz
jetpac.nes-63e23a3d74d3560ee0635d32961fd9c205890f05.zip
Add the __fallthrough__ pseudo-instruction
The 'nasm' assembler now implements this, which is quite convenient. Define also a fake macro for it when the assembler is not 'nasm' just to bridge the gaps. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm.s b/include/asm.s
index 67b195c..09229f9 100644
--- a/include/asm.s
+++ b/include/asm.s
@@ -20,3 +20,13 @@
.macro JAL ADDR
jmp ADDR
.endmacro
+
+;; Pseudo-instruction from 'nasm' that is not available for 'ca65'. An empty
+;; implementation is actually quite accurate, as it's just a way for 'nasm' to
+;; perform extra checks when programmers want to explicitly make the code fall
+;; through.
+.ifndef __NASM__
+ .macro __fallthrough__ arg
+ ;; Nothing to do.
+ .endmacro
+.endif