flat assembler
Message board for the users of flat assembler.

Index > Main > what is RIP relative addressing?

Author
Thread Post new topic Reply to topic
Theo



Joined: 19 Mar 2005
Posts: 7
Theo
i'm lerning 64bit assembly.

is there any detailed tutorial about the usage of registers? i think the tutorial in the fasm document is just too short.

and what is RIP relative addressing? something like offset?

Rolling Eyes
Post 26 Mar 2005, 23:45
View user's profile Send private message Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22
RIP is the 64 bit EIP register so it points to the address of the next instruction to be executed. So addressing relative to that point in the code would be RIP relative.
Post 01 Apr 2005, 03:18
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
AAAAAAAAAAAaaaaaaaaaaaaaa NOW I understand Very Happy Very Happy Very Happy

check this out:
IP - instruction pointer (16bit)
EIP - (extended) instruction pointer (32bit)
RIP - (Really BIG) instruction pointer (64bit)

it like AL, AX, EAX, RAX, etc....

Wink
Post 01 Apr 2005, 08:22
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
rea



Joined: 14 Nov 2004
Posts: 92
rea
An is not bad (I supose) think like [ebp-4] and all those, but with rip...


Perhaphs the fun question is, for what is used??? access data, code, jump???

_________________
A language should be understable, not commentable Razz and a derivation of the language should continue being understable
Post 01 Apr 2005, 13:42
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen
rea wrote:
Perhaphs the fun question is, for what is used??? access data, code, jump???

AMD manual wrote:

This feature is paticularly useful for addressing data in position-independent code and for code that addresses global data.

This feature will be very useful in my project. It heavily uses a pointer to huge position-independent global data (array of structures). Now I have to use one of seven general registers (I don't count ESP) to access those data so I'm often lacking registers. With RIP-relative adressing, I can access those data through RIP and I can free that register up Very Happy

_________________
x86asm.net
Post 03 Apr 2005, 13:06
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.