explain why this code can't be assembled

789 Views Asked by At

recently,i have started larning about assembly & computer physical stuffs,& when i arrived at writing assembly codes,i tried to link the first program the book i was using gave me but whenever i try to do so i get the following error messages:

E:\masm32\code.asm(1) : error A2008: syntax error : floating point constant
E:\masm32\code.asm(2) : error A2085: instruction or register not accepted in cur
rent CPU mode

\masm32\include\windows.inc(78) : error A2119: language type must be specified
                                 ...
\masm32\include\masm32.inc(153) : error A2119: language type must be specified
\masm32\include\masm32.inc(154) : fatal error A1012: error count exceeds 100; st
opping assembly

Im using MASM32 on windows xp & the code im trying to assemble & link:

386.
model flat, stdcall.
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
data.
HelloWorld db "Hello World!", 0
code.
start:
invoke StdOut, addr HelloWorld
invoke ExitProcess, 0
end start

& Thnx in advance.

1

There are 1 best solutions below

0
On

You've placed the dots at the wrong place. They should prefix the directives, not suffix them:

.386
.model flat, stdcall