flat assembler
Message board for the users of flat assembler.

Index > Main > Is it possible to get rsp+8 directly?

Author
Thread Post new topic Reply to topic
moveax41h



Joined: 18 Feb 2018
Posts: 59
moveax41h
I am trying to perform:
Code:
mov rsi, rsp+8
    


But I get an error about extra characters on the line. If I do mov rsi, [rsp+8] this does not have the desired effect. But if I do:

Code:
mov rsi, rsp
add rsi, 8
    


That gives me the desired effect. Must I do that or is there a way to achieve this in one line?

_________________
-moveax41h
Post 03 Dec 2019, 06:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17074
Location: In your JS exploiting you and your system
revolution
Yes.
Code:
lea rsi,[rsp+8]    
Post 03 Dec 2019, 06:14
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7623
Location: Kraków, Poland
Tomasz Grysztar
As a coincidence, I have just mentioned this as an incidental remark in the latest part of my elementary tutorial.
Post 03 Dec 2019, 08:28
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.

Powered by rwasa.