【发布时间】:2019-04-28 04:14:13
【问题描述】:
我在尝试汇编代码时遇到以下汇编错误:
Error: invalid operands (*UND* and *UND* sections) for `-' when setting `UPPER_CONVERSION'
我正在使用以下命令进行组装:
as -32 toupper.s -o toupper.o
我的代码(我指的是this书的从低到高的转换代码):
.section .text ###CONSTANTS## #The lower boundary of our search .equ LOWERCASE_A, ’a’ #The upper boundary of our search .equ LOWERCASE_Z, ’z’ #Conversion between upper and lower case .equ UPPER_CONVERSION, ’A’ - ’a’ ## error on this line
有关使用$UPPER_CONVERSION 作为立即数的完整代码,请参阅此问题的第一个版本。但以上是产生汇编错误消息的 MCVE,因此不能用作定义UPPER_CONVERSION = 65 - 97 = -32
我看到this的问题,我尝试了解决方案,但我认为它不相关(我可能在这里错了)。
【问题讨论】:
标签: assembly x86 gnu-assembler