flat assembler
Message board for the users of flat assembler.

Index > DOS > Where does JMP 0 point to?

Author
Thread Post new topic Reply to topic
FlierMate1



Joined: 31 May 2022
Posts: 112
FlierMate1
I paste the code on online disassembler, surprisingly:
JMP 0 is equivalent to: JMP absolute address 0x0000ff00

Why is it so?
Post 29 Jun 2022, 14:39
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18727
Location: In your JS exploiting you and your system
revolution
jmp 0 transfers execution to address cs:0. But if your disassembler shows the immediate value (and not the relative address) then jmp 0 goes to the next instruction (that is, it is similar to a nop).

So it will be either of those above, or the tool is broken and not trustworthy.
Code:
jmp lab ; encodes imm = 0
lab:    
Or
Code:
jmp 0 ; encodes offset (-lab)
lab:    
Post 29 Jun 2022, 15:07
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.