Mar 2, 2014 at 6:57pm UTC
its equivalent to return 1000 in terms of C++
Mar 3, 2014 at 12:38am UTC
I know, but the program instantly crashes.
Mar 3, 2014 at 12:40am UTC
What compiler are you using? What compiler is the tutorial using? Are they the same?
Mar 3, 2014 at 3:06am UTC
@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?
Mar 3, 2014 at 3:42am UTC
No, Microsoft's inline assembly is completely different from GNU's inline assembly.
Mar 3, 2014 at 3:44am UTC
Can you help me? I'm just a assembly begginer. Do you haz teh codez? :P
Last edited on Mar 3, 2014 at 3:46am UTC
Mar 3, 2014 at 6:27am UTC
In AT&T syntax it would be: asm ("mov $1000, %eax" );
Try it and tell us if it doesn't explode your computer.