这是我学习 NASM 和汇编语言的第二天,所以我决定写一种计算器。问题是当用户输入操作时,程序不比较它。我的意思是比较,但它不认为字符串相等。我google了很多,但没有结果。我的问题可能是什么?这是来源
operV resb 255 ; this is declaration of variable later used to store the input, in .bss of course
mov rax, 0x2000003 ;here user enters the operation, input is "+", or "-"
mov rdi, 0
mov rsi, operV
mov rdx, 255
syscall
mov rax, operV ; here is part where stuff is compared
mov rdi, "+"
cmp rax, rdi
je add
mov rdi, "-"
cmp rax, rdi
je substr
;etc...