我正在使用Visual Studio 2022社区使用MASM和Kip Irvine的库等。我必须使用它们的类,我目前在(VS和Kip)我花了几天的时间来弄清楚如何只是得到所有的文件路径的权利,现在我唯一的问题是这个错误的“多”。MODEL指令。
下面是我的代码:
.386
.MODEL flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
includelib \Irvine\Irvine32.lib
include \Irvine\Irvine32.inc
include \Irvine\macros.inc
includelib \Irvine\kernel32.lib
.data
prompt1 db "Please enter your Name >> ",0
prompt2 db "Please enter your age >>",0
fname db 20 DUP(?)
age DWORD ?
prompt3 db "Your name is: ",0
prompt4 db "Your age is: ",0
.code
main proc
mov edx,offset prompt1
call writestring
mov edx, offset fname
mov ecx, sizeof fname
call readstring
call Crlf
mov edx, offset prompt2
call writestring
call Readdec
mov age,eax
call Crlf
mov edx, offset prompt3
call writestring
mov edx,offset fname
call writestring
call Crlf
mov edx, offset prompt4
call writestring
mov eax,age
call writedec
call Crlf
invoke ExitProcess,0
main endp
end main
1条答案
按热度按时间deyfvvtc1#
当您执行
include \Irvine\Irvine32.inc
时,它间接包含(通过SmallWin.inc
):要解决这个问题,只需在包含
irvine32.inc
时删除.model
指令。同样,您也可以删除.stack
和CPU指令(.386
)。