I am trying some assembly code to learn how it works but in my first example i faced with the buffer overrun exception. I am using VS2013 express edition and i am using c++ code to make the assembly code work by using extern "C" functionality. I tried to change some VS options but it did not work. What could be reason to give a buffer overrun exception while it is that much simple statement. Normally i build and executed without the mov statement.
Edit : Just add a ret statement for the macro and the problem solved.
This is assmbly part:
.586
.model flat,c
.data
.code
doit proc
mov eax, 8
doit endp
end
and here it is c++ part:
extern "C" void doit();
void main()
{
doit();
}