-2

So I'm learning Assembly and i have come across this code:

movl num(,%eax,4), %eax

Can someone explain what that num() function is?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Newb18
  • 167
  • 2
  • 11

1 Answers1

2

It is not a function, it is an element of the AT&T assembly syntax. That line means "move 32-bit value at address eax*4 + num to eax".

In Intel syntax it would be mov eax, [eax*4 + num].

glauxosdever
  • 652
  • 4
  • 11