我正在尝试制作一个程序,它获取两个输入数字,将它们相乘(将结果存储在一个变量中),将它们相除(将结果存储在另一个变量中)并打印结果。
我遇到的问题是第一行代码push num1
返回invalid instruction operands
:
.data
num1 db "Enter a number:"
num2 db "Enter another number:"
.data?
buffer1 dd 100 dup(?) ; this is where I store input for num1
buffer2 dd 100 dup(?) ; " " num2
.code
start:
push num1 ; here is where it returns the error
call StdOut ;I want to print num1 but it doesn't get that far.
; later on in my code it does multiplication and division.
push buffer1 ; I push buffer1
call StdIn ; so that I can use it for StdIn
; I repeat this for num2
; I then use those 2 numbers for multiplication and division.
为什么会导致此错误?