Why doesn't this .asm code assemble in MASM?

Belloc 21 Reputation points
2021-10-30T13:54:09.083+00:00

The code below doesn't assemble in Visual Studio 2019:

> .286

> .model small, stdcall

> .stack 4096

> .code

> main PROC

>  xor eax, eax

>  ret

> main ENDP

> END main

The code emits error A2008: syntax error : . for the .286

If I replace .286 with .386, or .486 the code executes normally. What am I missing?

Please disregard my tag. Otherwise I wouldn't be able to post the question.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,519 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 40,021 Reputation points
    2021-10-30T13:59:28.883+00:00

0 additional answers

Sort by: Most helpful