xa #include导致语法错误(xa #include results in syntax error)

编程入门 行业动态 更新时间:2024-10-27 22:32:39
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 errors

Is 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.

更多推荐

本文发布于:2023-07-24 19:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1250222.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:语法错误   include   xa   error   syntax

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!