如何在宏中使用 .data 指令
How to use a .data directive inside a macro
write macro msg
.data
string byte msg,0
endm
报错"unmatched block nesting: main"。从上面的宏中删除 .data 不会导致此错误。
在 endm
之前的宏中添加一个 .code
指令(即使没有代码)。这个宏应该可以工作:
write macro msg
.data
string byte msg,0
.code
endm
write macro msg
.data
string byte msg,0
endm
报错"unmatched block nesting: main"。从上面的宏中删除 .data 不会导致此错误。
在 endm
之前的宏中添加一个 .code
指令(即使没有代码)。这个宏应该可以工作:
write macro msg
.data
string byte msg,0
.code
endm