I found some 6502 assembler code for a Commodore 64 program that uses meta commands like #include "foobar", define the address to be assembled to via *=$1234 and define labels without a colon. Comments are marked with a leading ;, and the syntax allows for specifying characters as constants such as in lda #'A'.

Which assembler programs have this kind of syntax and could be used to assemble the file?

I already know that

  • ca65 assembler uses keywords like .import and .export but not #include. And ca65 requires a colon after a label definition
  • dasm assembler files define the start address with the org directive, but not with *=
  • kickass assembler has different comment format
  • 64tass does not know the includekeyword

so it is none of the above (I tried and the build failed).

  • 1
    So far it might be safe to assume you're looking fro an 6502 assembler, but what computer?
    – Raffzahn
    Feb 26, 2019 at 20:49
  • 2
    It is for a C64, I added it to the description.
    – Peter B.
    Feb 26, 2019 at 20:57
  • 5
    I suggest ignoring #include and any other C preprocessor like directive, and assume the source code you're looking at meant to handled by passing the source though a C preprocessor before being assembled. The GNU Assembler doesn't support C preprocessing directives, but you'll find a lot of code written for it that uses them anyways.
    – user722
    Feb 26, 2019 at 20:57
  • Having used DASM extensively for 15 years, I 'converted' to KickAss a couple of years ago. It's my preferred cross-assembler for 6502 now, and well worth the effort of doing the work necessary to shift from DASM (or other) syntax. Feb 26, 2019 at 21:09
  • Do you know anything about the age of the source? It could narrow down the possibilities. Also comments might give some clues to those who knows the assembler.
    – UncleBod
    Feb 26, 2019 at 21:45

1 Answer 1


I think it's xa (xa65):

  • #include "foobar"
  • define the address to be assembled to via *=$1234
  • define labels without a colon
  • Comments are marked with a leading ;
  • specifying characters as constants such as in lda #'A' — the example given in the manual uses double quotes (lda #"A"): is that a disqualifier?
  • .pet pseudo-op to include PETSCII-encoded strings — nope, sorry, but you might be able to replicate that in xa65 with .asc and running the assembler with the -O PETSCII option.

Update: via comments

narrator voice: it was not xa65, but DreamAss (original link|newer github link).

  • 1
    I just had a chat with André Fachat, the original author, and he's pretty sure that xa65 makes a good match - including the single quote part, which he double checked in source. So I guess Scruss hit it.
    – Raffzahn
    Feb 26, 2019 at 22:25
  • 4
    I tried xa and it threw an error on a command ".pet". Googling that led me to the right assembler, it was DreamAss. Thanks a lot for the idea with xa helped me find it!
    – Peter B.
    Feb 26, 2019 at 22:35
  • 4
    ah, you never mentioned the .pet bit. Glad you found your assembler, even if it has a truly terrible name …
    – scruss
    Feb 27, 2019 at 1:17
  • 1
    @PeterB. what is .pet? For the Commodore PET? You said the source is for the C64? Feb 27, 2019 at 9:42
  • 1
    @Wilson - .pet seems to be the directive in DreamAss to include the following bytes in [PETSCII ](en.wikipedia.org/wiki/PETSCII), which was common to most of the C= 8-bits
    – scruss
    Feb 27, 2019 at 11:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .