Arakula / A09

A09 6800/6801/6809/6309/68HC11 Assembler
GNU General Public License v2.0
40 stars 8 forks source link

a09 won't take OPT without leading tab #5

Closed raybellis closed 4 years ago

raybellis commented 4 years ago

I tried to use insert in f9dasm to include the OPT H03 directive so that I don't need to specify it on the command line.

a09 then reports this:

lo.asm(211) : error 16: Illegal mnemonic in "OPT H03"

If I manually insert a leading tab the OPT directive works correctly.

There doesn't seem to be a way to add the leading tab in the f9dasm info syntax, even though the manual says "insert any assembler statement or pseudo-op".

I can work around this, of course (by using the command line option).

raybellis commented 4 years ago

The other work around I just realised is to add a label to the include line in my .info file:

INSERT 0x0000 OPTS OPT H03
INSERT 0x0000 OPTS OPT TSC

(curiously, using 0x0000 makes f9adsm put these lines before the "used labels" table, but doesn't increase the size of the binary, with its first ORG directive specifying a start address of 0x8000).

Arakula commented 4 years ago

I'd normally add things like that (with leading blanks) by putting lines of the form insert 0 \ OPT H03 (i.e., backslash + as many blanks as you want) into the info file. Backslash+tab should work as well.

raybellis commented 4 years ago

Thanks - that works :)

Arakula commented 4 years ago

Next version of f9dasm will have a (hopefully) clarifying note in f9dasm.htm:

Note: wherever text requires leading blanks or tabs, it isn't possible to simply put them into the instruction, as f9dasm would discard them. For these cases, simply prepend a '\' (backslash) to the text, like, for example, in insert 0 \ OPT H63 so that f9dasm knows where text really starts. Despite the similarity, f9dasm doesn't know the range of "C" escape characters; a '\' simply means "Ignore this backslash, but make sure the next character is part of the text". If you need to have a as part of the text, it is mandatory to write it as \*; f9dasm would otherwise assume the line ends at the , which starts the comment part.

raybellis commented 4 years ago

I'm having some odd issues with the backslash which I'll add to the f9dasm project