Understanding %rip register in intel assembly

RIP addressing is always relative to RIP (64bit Instruction Pointer) register. So it can be use for global variables only. The 0 offset is equal to address of the following instruction after the RIP-addressed instruction. For example: mov al,[rip+2] al=53 jmp short next (length=2 bytes) db 53 next: mov bl,[rip-7] (length=6 bytes) bl=53 You wouldn’t … Read more

What does an asterisk * before an address mean in x86-64 AT&T assembly?

It’s AT&T assembly syntax: source comes before destination mnemonic suffixes indicate the size of the operands (q for quad, etc.) registers are prefixed with % and immediate values with $ effective addresses are in the form DISP(BASE, INDEX, SCALE) (DISP + BASE + INDEX * SCALE) Indirect jump/call operands indicated with * (as opposed to … Read more