NASM 文档指出:
The only characters which may be used as the first character of an identifier are letters, . (with special meaning: see section 3.9), _ and ?.
我需要调用一个外部过程,其符号以前导$
开头。遗憾的是,文档没有指定如何转义 $ 或如何处理限制。
有人知道如何指定带有前导美元符号的外部符号吗?
最佳答案
I need to call an external procedure whose symbol starts with a leading
$
. Sadly the docs do not specify how to escape the $ or how to deal with the restriction.
文档没有解释这一点,因为这是不可能的。
extern
directive将始终忽略前导 $
(寄存器 rax
与标签 rax
之间没有歧义,因为寄存器不能在标签声明中使用)。
任何标识符的第一个实际字符必须是 categorized as NCT_IDSTART
,否则无效。
关于assembly - 带有前导 $ 的 NASM 外部符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63586178/