Search code examples
assembly6502

xa #include results in syntax error


The xa assembler by Mr. Fachat says in the man page:

#include "filename"
Inserts  the  contents  of  file filename at this position. If the file is not 
    found, it is searched using paths specified by the -I command line option or
    the environment variable XAINPUT (q.v.). When inserted, the file will also be
    parsed for preprocessor directives.

Now I can't figure out why this is not working:

$ cat test1.asm 
    #include "test2.asm"
$ cat test2.asm 
    rts
$ xa test1.asm 
 #include "test2.asm"
test1.asm:line 1: 1000:Syntax error
Break after 1 errors

Is the documentation wrong? Am I doing something incorrectly?

I am using xa v2.3.5 in case that's relevant.


Solution

  • So as Nick said it was leading whitespace that was the error.

    Deleting that let the program compile.