0

I am working on some gas assembly code, and I cannot find the meaning of parenthesis and tab in the code. Take some examples:

cmpl $99,-4(%ebp)

movl $1,(%eax,%edx)

leal 0(,%edx,4),%eax

 pushl %ebp
 movl %esp,%ebp
 subl $2,%esp
 movl $0,tab

Does parenthesis means math operation? If so, what does (%eax,%edx) and 0(,%edx,4) mean? Is tab a contant in gas assembly?

Jester
  • 56,577
  • 4
  • 81
  • 125
David
  • 1,646
  • 17
  • 22
  • For these instructions look up the instruction itself. The keyword for what you are looking for ("the meaning of...y") is **syntax**. So search the net for "leal syntax" [ leal 0(,%edx,4),%eax ] == [ eax = '' + 0 + 4*edx ] – entitycs Oct 04 '15 at 22:15
  • [This answer](http://stackoverflow.com/a/32704450/547981) explains the effective address syntax, I am closing as duplicate. As for `tab`, that's just a symbol defined elsewhere in the code. – Jester Oct 04 '15 at 22:26

1 Answers1

0

As far as I know regarding parenthesis in Assembly it means moving a register stored as a pointer into the location that is in the parenthesis for instance:

mov (%eax) / moves the value stored in the pointer to eax