xa #include导致语法错误(xa #include results in syntax error)
Fachat先生的xa汇编程序在手册页中说:
#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.现在我无法弄清楚为什么这不起作用:
$ 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文档是否错误? 我做错了什么吗?
如果相关,我使用xa v2.3.5。
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 errorsIs the documentation wrong? Am I doing something incorrectly?
I am using xa v2.3.5 in case that's relevant.
最满意答案
正如尼克所说,这是导致空白的错误。
删除让程序编译。
So as Nick said it was leading whitespace that was the error.
Deleting that let the program compile.
更多推荐
发布评论