its equivalent to return 1000 in terms of C++
I know, but the program instantly crashes.
What compiler are you using? What compiler is the tutorial using? Are they the same?
@LB Nope. I use GNU GCC (MinGW), and the tutorial uses MSVC++, but I saw that using the GCC asm() and string literals results in the same. At least, should. Do you think that my asm code is correct?
No, Microsoft's inline assembly is completely different from GNU's inline assembly.
Can you help me? I'm just a assembly begginer. Do you haz teh codez? :P
Last edited on
In AT&T syntax it would be:
asm("mov $1000, %eax");
Try it and tell us if it doesn't explode your computer.