I have been having trouble with assembling a program, and I would really appreciate any help.

The program is as follows:

.model small
.stack
.code
start
mov ah,2h
mov dl,2ah
int 21h mov ah,4ch
int 21h
end

When I build it I get a "error a2008: Syntax error: start" error. What does this mean, and how to I fix it?

Thanks to any suggestions.

Recommended Answers

i think your coding for tasm..i havent learned masm..i think your problem is with start..
the code suppose to be like

.model small
.stack
.code
start:
mov ah,2h 
mov dl,2ah 
int 21h 
mov ah,4ch 
int 21h
end start

you just lack ":" on start..

Jump to Post

I have been having trouble with assembling a program, and I would really appreciate any help.

The program is as follows:

.model small
.stack
.code
start
mov ah,2h
mov dl,2ah
int 21h mov ah,4ch
int 21h
end

When I build it I get a "error a2008: Syntax error: start" error. …

Jump to Post

All 5 Replies

i think your coding for tasm..i havent learned masm..i think your problem is with start..
the code suppose to be like

.model small
.stack
.code
start:
mov ah,2h 
mov dl,2ah 
int 21h 
mov ah,4ch 
int 21h
end start

you just lack ":" on start..

i think your coding for tasm..i havent learned masm..i think your problem is with start..
the code suppose to be like

.model small
.stack
.code
start:
mov ah,2h 
mov dl,2ah 
int 21h 
mov ah,4ch 
int 21h
end start

you just lack ":" on start..

Ah, thank you for your help. Do you know if there is a source on the web for MASM syntax?

I have been having trouble with assembling a program, and I would really appreciate any help.

The program is as follows:

.model small
.stack
.code
start
mov ah,2h
mov dl,2ah
int 21h mov ah,4ch
int 21h
end

When I build it I get a "error a2008: Syntax error: start" error. What does this mean, and how to I fix it?

Thanks to any suggestions.

It looks to me as if there is no colon after "start". You need a colon after a label

Hmmm... now I'm getting a warning, an error, and a fatal error from the linker:

examp2. obj : warning LNK4078: multiple ".data" sections found with different attributes (C0220040)
LINK: error LNK2001: unresolved external symbol _WinMainCRTStartup
examp2.exe: fatal error LNK1120: 1 unresolved externals
_
Link error

Do I need to include a library or something like that?

oh yeah one thing you lack there is .data which placed like a header..

.model small
.stack
.data
.code
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.