Skip to main content
gamedev.net
🔒 Locked

gcc inline asm memory access

Started by JHL 1 reply 650+ views
Original Post
JHL
JHL
I was hoping some one could explain to me the pointer offsets and such you know like movb SomeSymbol(%%eax,%%ebx),%%cl I mean what is the formual for finding out exactly where its geting the byte from. I''ve look throw documention and researched it on the web but have only found my self more confused
micca
micca
Look at http://www.linuxassembly.org/

...

DISP(BASE,INDEX,SCALE). A concrete example would be;

movl mem_location(%ebx,%ecx,4), %eax

Which is equivelent to the following in intel syntax;

mov eax, [eax + ecx*4 + mem_location]
...
JHL
JHL
perfect

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.