Я пытаюсь создать программу, которая получает два входных числа, умножает их (сохраняя результат в переменной), делит их (сохраняя результат в другой переменной) и печатает результат.x86 assembly - masm32: проблемы с нажатием переменной в стек
Проблема у меня в том, что в первой строке кода 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.
Почему это вызывает эту ошибку?
Спасибо Gunner, работает! – Progrmr