Reputation: 17427
I can't find in the documentation the exactly implementation of label(not in modern assemblies) To where does it points? I had in my mind that's the address of first instruction,for example:
global _start
section .text
_start:
call exit
exit:
mov eax,1
mov ebx,20
int 0x80
section .data
list:
dd exit
the list
shouldn't be same address as exit
that's the first seen by label?
I want to do something like this:
mov eax,list
call eax
it's a try to make function-pointer-like in assembly.
Upvotes: 0
Views: 1155
Reputation: 360732
The label is just a mnemonic referring to the address of the first instruction AFTER the label. e.g. exit:
points to wherever the mov eax,1
physically exists in ram.
Upvotes: 2