我正在尝试完成80x86汇编语言程序,该程序提示并输入框的长度,宽度和高度,并计算并显示其体积(长*宽*高)。
我是初学者,所以不知道我在做什么错
.586
.MODEL FLAT
INCLUDE io.h ; header file for input/output
.STACK 4096
.DATA
Lenght DWORD ?
Width DWORD ?
Hight DWORD ?
prompt1 BYTE "Enter lenght ", 0
prompt2 BYTE "Enter width", 0
prompt3 BYTE "Enter hight", 0
string BYTE 40 DUP (?)
resultLbl BYTE "The volume is", 0
res BYTE 11 DUP (?), 0
.CODE
_MainProc PROC
input prompt1, string, 40 ; read ASCII characters
atod string ; convert to integer
mov Length, eax ; store in memory
input prompt2, string, 40 ; repeat for second number
atod string
mov Width, eax
input prompt3, string, 40 ; repeat for third number
atod string
mov Hight, eax
mov eax, Length ; first number to EAX
mul eax, Width ; add second number
mul eax, Hight ; add second number
dtoa res, eax ; convert to ASCII characters
output resultLbl, res ; output label and sum
mov eax, 0 ; exit with return code 0
ret
_MainProc ENDP
END ; end of source code
这些是我得到的错误:
Description Severity Code Project File Line Suppression State
missing operand after unary operator Error A2081 27
missing operand after unary operator Error A2081 31
missing operand after unary operator Error A2081 41
syntax error : , Error A2008 42
syntax error : , Error A2008 43
syntax error : width Error A2008 14
The command "ml.exe /c /nologo /Zi /Fo"Debug\example.obj" /W3 /errorReport:prompt /Fl /Taexample.asm" exited with code 1. Error MSB3721 C:\Users\rzaman\Downloads\AARaianaZaman\solutions\solutions\windows32 70