flat assembler
Message board for the users of flat assembler.

Index > Main > rex iret,

Author
Thread Post new topic Reply to topic
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1 24 Apr 2006, 19:15
AMD vol2 p295 says that long mode iret requires a 64-bit
rex prefix,

now AMD vol 3 p16 talks about rex, it says
there are 4 flags rex.w, rex.r, rex.x, rex.b

no idea how you do this with fasm,

how do I do a 64 bit no-op interrupt handler?

fasm does not accept eg:

Code:
use64
handler:
       rex
       iret
    


anyone know the correct way to do this?

can I do it via a db value eg
"db 66h" is the "opsize" prefix
Post 24 Apr 2006, 19:15
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 24 Apr 2006, 20:30
I think you can do iretd and iretq and the prefix added is not 66h but 48h
Post 24 Apr 2006, 20:30
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1 24 Apr 2006, 21:28
Madis731 wrote:
I think you can do iretd and iretq and the prefix added is not 66h but 48h


ok, I tried it just now and it looks correct Razz

the hex of "iretq" is 48CFh which appears to be right,


with interrupt handlers where there is an error code
do I have to pop the error code before iretq or
is that done automatically? Surprised

or can I do it both ways either pop or not pop? Confused

one other thing: how many interrupt handlers are required?

vectors 0 up to 255 or less?

I want to create a full set of no-op handlers,
Post 24 Apr 2006, 21:28
View user's profile Send private message 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.