Re: Jumping into middle of instruction
- From: "Wolfgang Kern" <spamtrap@xxxxxxxxxx>
- Date: Fri, 29 Feb 2008 17:07:40 +0100
Bob Masta wrote:
How does Real Mode make a difference here?You can't direct write to CodeSeg in protected mode.
That may be true in some sense, but not as a practical
matter... it is easy to create apps with combined code+data
that allow you to write anywhere in your own program space.
I use a .data? (BSS) section for uninitialized data and a
..code section for everything else. The linker needs to have
/SECTION:.text,ERW to handle this properly.
Yes, in the 'flat-OS' world code and data will match anyway,
I just mentioned it because of the CS-override in my example.
Self-modifying code seems to have a bad name, but it
shouldn't. Think about how you would do self-decryption
without it!
Sure, SMC got its place for many things and it can be used to create
extremely short routines even if they are very complex,
but I wont recommend to use it on active running code whenever speed
is of concern, too many penalties (cache invalidates/TLB-flushes/..)
are to expect here.
__
wolfgang
.
- References:
- Jumping into middle of instruction
- From: mybwpp@xxxxxxxxxxxxxx
- Re: Jumping into middle of instruction
- From: Wolfgang Kern
- Re: Jumping into middle of instruction
- From: mybwpp@xxxxxxxxxxxxxx
- Re: Jumping into middle of instruction
- From: Wolfgang Kern
- Re: Jumping into middle of instruction
- From: Bob Masta
- Re: Jumping into middle of instruction
- From: Wolfgang Kern
- Re: Jumping into middle of instruction
- From: Bob Masta
- Jumping into middle of instruction
- Prev by Date: Re: Seg fault with hla 1.99 on Fedora 8 linux
- Next by Date: Re: referring to segment offsets in read address mode
- Previous by thread: Re: Jumping into middle of instruction
- Next by thread: Re: Jumping into middle of instruction
- Index(es):
Relevant Pages
|