c++ - gcc undeclared identifier "_asm" -



c++ - gcc undeclared identifier "_asm" -

i'm trying understand how memory works, , how every instruction allocates memory. i'm trying understand concept of offset, , base of operations pointers. doing intel processors , mips. able access memory windows in visual studio, when utilize gcc , gdb on unix, error on code ![after compilation code][1]

error: utilize of undeclared identifier "_asm" _asm

i not error in visual studio here's i'm trying run (very simple code)

class="snippet-code-html lang-html prettyprint-override">void main() { int quizint = 0x01000080; int n = 0xfffffff; int mipszint = 0x80000001; register int m = 3; register int p = 256; static int q = 0x7fffffff; static int r = 0x10000000; static int r = 0x8000000; _asm { start_loop: mov ebx, mipszint add ebx, -2 mov ecx, quizint mov eax, n sub eax, q add eax, r mov edx, 1 add edx, q add edx, 1 add edx, n add r, -1 } }

====>>> _asm gives me error. question is, need add together in order create work in gcc?

gcc calls asm instead of _asm , syntax little different. see https://gcc.gnu.org/onlinedocs/gcc/extended-asm.html , http://www.ibiblio.org/gferg/ldp/gcc-inline-assembly-howto.html

c++ c unix gcc gdb

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -