Oneironaut wrote:
Still wish I could use the same sequence for all three bytes though.
Something like in Verilog would be nice... LDA #647381[15:7]
Unfortunately, the world of do-it-yourself assemblers is a chaotic one. For example, in Mr. Kowalski's assembler,
@ is the radix for binary, not
% as is defined in the MOS Technology and WDC assembler syntax standards. He uses
% to refer to macro parameters, probably because MS-DOS, and by extension, Windows, uses
% to refer to the MS-DOS equivalent of UNIX environment variables, which are prefixed with
$ when referenced.
Further muddying the waters, the MOS/WDC syntax uses
@ as the radix for octal notation, as does the Commodore 128 machine language monitor and Supermon 816. When I first started using the Kowalski assembler about a dozen years ago I kept tripping over trying to use
% as a radix for binary and only through trial and error discovered what the correct radix symbol was.
Something else in the Kowalski assembler that might give you some grief is statement parsing. The parser expects that labels, symbol definitions and macro declarations always start in column one. If you place a mnemonic or a pseudo-op in column one the assembler will apparently try to treat it as a label or symbol and flag it as an error. Similarly, if you start a label or symbol in any column other than column one the assembler will apparently treat it as a mnemonic, macro invocation or pseudo-op and it will likewise be flagged as an error. Also, in a few cases lack of whitespace around operators may be an issue. If you get a diagnostic on a statement containing both an operator and a pseudo-op, such as
I .set I+1, and see no apparent error, try surrounding each operator (
+ in this example) with a space. Not that
.set is a pseudo-op that can also be expressed as
.=, with no space between
. and
=.
The assembler is actually quite powerful, but has its little quirks. The last version that Mike Kowalski released was
1.2.12, which may be
downloaded here. A number of bugs related to macro processing were addressed in this final version.