Message board for the users of flat assembler.
> Programming Language Design > fasmg macro support for Parallax MCUs
Goto page 1, 2 Next
I'm still getting used to what fasmg can do, in the macros.
Standard Opcodes I can find examples on, but there is a slight variant in Parallax MCUs that has me stalled ?
A simple ADD is easy enough
ADD ParD,ParS ;100000 001i 1111 ddddddddd sssssssss
but there is a skip form to every opcode, that encodes like
IF_Cond ADD ParD,ParS ;100000 001i wxyz ddddddddd sssssssss
ie the Cond name, encodes into wxyz bits, with default/omitted taken as IF_ALWAYS -> 1111
What is a compact/efficient way to add such an optional prefix to fasmg ?
|20 Sep 2016, 21:11||
expanding on that, I find a small fasmg issue with binary numerics.
dd 10000001b shl 22
is accepted as ok, but a 10 char binary string gives an error ?
dd 1000000010b shl 22
Surely binary stings to 32 chars or even 64 should be valid ?
There may be a case for modula-8 length check, but in this case, the natural field is 10b, so that would make the macro larger than it needed to be.
Just tested latest Version that adds Underscore, and it also fixed this issue.
(flat assembler g version 0.98.1474353977)
Valid now, are all of the below, a number too large for the field, flags an error.
dd 10000000_10b shl 22 dd 1111_1010_0101_0111_0110_0101_0100_0011b ; dd