Hello, I'm writing a compiler in C++ which generates x86 assembly code. I'm using masm32 to test generated code. I don't really know assembly, I have to look up a lot of things while writing code. My problem is that when I generate the code for a division, like
mov edx, 4
mov edx, 2
mov edx, eax
and assemble it with masm32, after assembling and linking, when I run it, it says text.exe has stopped working. When I've tried the same like this
mov eax, 4
mov ecx, 2
it does not work either. What am I doing wrong?