From 89288c4d8c54b1e4a77438b0f736599461d9f861 Mon Sep 17 00:00:00 2001
From: Andy McFadden
Date: Mon, 5 Aug 2019 11:48:10 -0700
Subject: [PATCH] Updated assembler bugs & quirks
Notably, updated remarks regarding cc65's handling of block move
operands, which are apparently "broken as intended".
---
SourceGen/RuntimeData/Help/codegen.html | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/SourceGen/RuntimeData/Help/codegen.html b/SourceGen/RuntimeData/Help/codegen.html
index 0789625..33b6838 100644
--- a/SourceGen/RuntimeData/Help/codegen.html
+++ b/SourceGen/RuntimeData/Help/codegen.html
@@ -132,7 +132,7 @@ code, but also needs to know how to handle the corner cases.
- Undocumented opcode
SHA (ZP),Y
($93) is not supported;
the assembler appears to be expecting SHA ABS,X
instead.
- - BRK, COP, and WDM are not allowed to have operands.
+ - COP and WDM are not allowed to have operands.
Quirks:
@@ -170,6 +170,7 @@ code, but also needs to know how to handle the corner cases.
outside bank zero cannot be assembled. SourceGen currently deals with
this by outputting the entire file as a hex dump.
Undocumented opcode $AB (LAX #imm
) generates an error.
+ WDM is not allowed to have an operand.
Quirks:
@@ -186,9 +187,11 @@ code, but also needs to know how to handle the corner cases.
ASR
instead.
Officially, the preferred file extension for ACME source code is ".a",
but this is already used on UNIX systems for static libraries (which
- means shell file completion tends to ignore it). Since ".S" is pretty
- universally recognized as assembly source, code generated by SourceGen
- for ACME also uses ".S".
+ means shell filename completion tends to ignore them). Since ".S" is
+ pretty universally recognized as assembly source, code generated by
+ SourceGen for ACME also uses ".S".
+ Does not allow the accumulator to be specified explicitly as an
+ operand, e.g. you can't write LSR A
.
@@ -199,12 +202,11 @@ code, but also needs to know how to handle the corner cases.
Bugs:
- - The arguments to
MVN
/MVP
are reversed (v2.17)
- or zeroed (v2.18).
- PC relative branches don't wrap around at bank boundaries.
- - [fixed in v2.18]
BRK <arg>
is assembled to opcode
+ - [Fixed in v2.18] The arguments to
MVN
/MVP
are reversed.
+ - [Fixed in v2.18]
BRK <arg>
is assembled to opcode
$05 rather than $00.
- - [fixed in v2.18]
WDM
is not supported.
+ - [Fixed in v2.18]
WDM
is not supported.
Quirks:
@@ -228,6 +230,9 @@ code, but also needs to know how to handle the corner cases.
multiple segments (it is, after all, an assembler for a C compiler).
A linker configuration script is expected to be provided for anything
complex. SourceGen generates a custom config file for each project.
+ The syntax for the 65816 block move instructions
+ (MVN
/MVP
) changed to a non-standard format
+ in v2.18, requiring a '#' before 8-bit constants.