Re: Jumping into middle of instruction
- From: ArarghMail802NOSPAM <spamtrap@xxxxxxxxxx>
- Date: Tue, 26 Feb 2008 16:58:37 -0600
On Tue, 26 Feb 2008 09:36:52 -0800 (PST), "mybwpp@xxxxxxxxxxxxxx"
<spamtrap@xxxxxxxxxx> wrote:
Can anyone explain the concept of 'Jumping into the middle ofSample snippet deassembly:
instructions'.
Rtn2:
B3 02 mov bl,2
B8 ? db 0B8h
Rtn3:
B3 03 mov bl,3
B8 ? db 0B8h
Rtn4:
B3 04 mov bl,4
B8 ? db 0B8h
What it looks like, while running:
13C2:0100 B302 MOV BL,02
13C2:0102 B8B303 MOV AX,03B3
13C2:0105 B8B304 MOV AX,04B3
13C2:0108 B89090 MOV AX,9090
If you start at Rtn2, then bl=2, and the rest of the code loads
garbage into ax.
If you start at Rtn3, then bl=3, and the rest of the code loads
garbage into ax.
. . .
Why it is used?
Usually to allow multiple entry points to a routine. Sometimes to
conserve space.
Can we hide arbitrary code (I/O instructions, system calls) by this technique ?Not really. As you can see, I decoded the above sample.
--
ArarghMail802 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
To reply by email, remove the extra stuff from the reply address.
.
- References:
- Jumping into middle of instruction
- From: mybwpp@xxxxxxxxxxxxxx
- Jumping into middle of instruction
- Prev by Date: Re: Jumping into middle of instruction
- Next by Date: Re: Cause IRQ5 programmatically
- Previous by thread: Re: Jumping into middle of instruction
- Next by thread: Re: Jumping into middle of instruction
- Index(es):
Relevant Pages
|