The MASM Forum

General => The Campus => Topic started by: sepult on October 28, 2022, 04:49:52 AM

Title: MODEL warning
Post by: sepult on October 28, 2022, 04:49:52 AM
A simple app gives a warning
.386
.model flat, stdcall
.stack 4096
include ..\include\masm32rt.inc

.data

.code

start:
mov     eax,edx
invoke  ExitProcess,NULL

end start


..\include\masm32rt.inc(33) : warning A4011: multiple .MODEL directives found : .MODEL ignored

should i ignore this warning or i need to change something? Thanks.
Title: Re: MODEL warning
Post by: zedd151 on October 28, 2022, 04:51:53 AM
You only need the line where you include masm32rt.inc
The lines above it are not necessary.


masm32rt.inc already specifies processor and model.
If a change is needed, write that after including masm32rt.inc to override what is already specified in masm32rt.inc.
For a simple program, the stack size needn't be changed.
Title: Re: MODEL warning
Post by: sepult on October 28, 2022, 04:55:21 AM
Thanks, no more warnings.
Title: Re: MODEL warning
Post by: zedd151 on October 28, 2022, 04:55:48 AM
 :thumbsup:
Sorry, I almost forgot the compulsory "Welcome to the forum" greeting, so welcome to the forum!  :biggrin:
Title: Re: MODEL warning
Post by: daydreamer on October 28, 2022, 05:43:03 AM
Welcome to forum sepult  :thumbsup:
Only needed to use
686p ; all 686 mnemonics + protected mnemonics enabled
XMM ;so you gonna write SSE code
With only low 386 you can get errors if you want to use 486, 586,686 instructions