Re: Two Click disassembly/reassembly
- From: "santosh" <santosh.k83@xxxxxxxxx>
- Date: 23 Jan 2006 01:04:43 -0800
Betov wrote:
> Frank Kotler <fbkotler@xxxxxxxxxxx> écrivait
> news:MMudnQUH6__prEneRVn-gg@xxxxxxxxxxx:
>
> > Assembly is generally considered not portable - and we *can't* do
> > non-x86...
>
> Wrong. There is nothing making it impossible, for an
> Assembler, to have as many Encoders inside as you want,
> and to _translate_ the x86 OpCodes, into replacements
> (when not equivalent) substitutes.
That would, IMHO, be the wrong way. x86 is a very complex processor
with a CISC face. Many other processors like SPARC, M68000 don't have
many of the features that x86 has. So translating x86 opcodes would be,
I assume, most confusing and error prone, both for the assembler and
for the user, if at all it is fully possible.
The better way is to have a set of front and back ends, each for a CPU
family. In that way, each front and back end would accept and parse the
native assembly syntax of it's target CPU and generate it's opcodes.
The appropriate front and back ends can be automatically called by the
driver program, either via a command-line switch or a 'syntax' or 'cpu
type' directive at the beginning of the source file.
Of course, practically speaking, this is equivalent to writing several
assemblers, each for a CPU family. When coding even _one_ assembler
properly is so much work, who would be vain enough/competent enough to
undertake this project?
Better use GNU as (GAS). It is exactly designed for this purpose, if
you can live with a twisted syntax.
:)
.
- Follow-Ups:
- Re: Two Click disassembly/reassembly
- From: Betov
- Re: Two Click disassembly/reassembly
- References:
- Two Click disassembly/reassembly
- From: randyhyde@xxxxxxxxxxxxx
- Re: Two Click disassembly/reassembly
- From: Frank Kotler
- Re: Two Click disassembly/reassembly
- From: Evenbit
- Re: Two Click disassembly/reassembly
- From: Frank Kotler
- Re: Two Click disassembly/reassembly
- From: Evenbit
- Re: Two Click disassembly/reassembly
- From: Frank Kotler
- Re: Two Click disassembly/reassembly
- From: Betov
- Two Click disassembly/reassembly
- Prev by Date: Re: Two Click disassembly/reassembly
- Next by Date: Re: Two Click disassembly/reassembly
- Previous by thread: Re: Two Click disassembly/reassembly
- Next by thread: Re: Two Click disassembly/reassembly
- Index(es):
Relevant Pages
|