Reputation: 3
I'm a student currently learning the basics of Assembly Language. I've bumped into a problem where the program is marking internal procedure calls as undefined symbols(A2006). Meanwhile calls to the included library work just fine.
After looking this problem up online, I've only seen people having issues with external calls because they forgot to use put in the include file. As for the procedures themselves, I've seen people set them up in two different ways and both give me the undefined error.
INCLUDE whatever
.data
.code
main proc
coding
CALL procedurefromwhatever ;this works just fine
CALL name ;this is the part that returns the A2006 undefined error
CALL name_proc ;this doesn't work either
exit
main ENDP
end main
name proc
coding
ret
name ENDP
name_proc:
coding
ret
name ENDP
Upvotes: 0
Views: 707
Reputation: 10371
The end main
line should close the entire document, so move it to the bottom (after the second name ENDP
), the document was closed at the wrong place, so the procedures don't belong to the code segment and they are not recognized:
INCLUDE whatever
.data
.code
main proc
coding
CALL procedurefromwhatever ;this works just fine
CALL name ;this is the part that returns the A2006 undefined error
CALL name_proc ;this doesn't work either
exit
main ENDP
;end main ◄■■■ WRONG PLACE. MUST BE AT THE BOTTOM.
name proc
coding
ret
name ENDP
name_proc:
coding
ret
name ENDP
end main ;◄■■■ RIGHT HERE!!!
Upvotes: 3