flat assembler
Message board for the users of flat assembler.

Index > Main > JUMP instruction bug I've seen for me

Author
Thread Post new topic Reply to topic
Diicorp95



Joined: 18 Mar 2021
Posts: 3
Location: Bristol, United Kingdom
Diicorp95
Hello, people! Do you have any idea why

Code:
jmp 0x00007E00    


compiles into

Code:
jmp 0x00000200    


?

I'm sure that I did everything OK. Sad
Post 18 Mar 2021, 13:17
View user's profile Send private message Reply with quote
Diicorp95



Joined: 18 Mar 2021
Posts: 3
Location: Bristol, United Kingdom
Diicorp95
I think that's because of org 0x7C00, because 0x7E00 - 0x7C00 = 0x0200...
Post 18 Mar 2021, 13:53
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18222
Location: In your JS exploiting you and your system
revolution
All jmp and call instructions are IP relative when you use an immediate operand.

Everything is as expected.
Post 18 Mar 2021, 16:20
View user's profile Send private message Visit poster's website Reply with quote
Diicorp95



Joined: 18 Mar 2021
Posts: 3
Location: Bristol, United Kingdom
Diicorp95
revolution wrote:
All jmp and call instructions are IP relative when you use an immediate operand.

Everything is as expected.


I've tested it on zero-filled IP.
Post 19 Mar 2021, 15:15
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.