[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Disassemblers - Generate compiler code-x's source code?



>From what little I've seen, I'd be amaised if GMP4 code wasn't written in 
assmebler. My ECU's code looks far to efficient to have been written in C, 
Pascal, Fortran, (or Basic ha ha). I did hear a roumor about Fourth, but 
since the bits I've looked at are about as efficient as they can be, I just 
don't see how any high level language could have been used. If it was, then 
the compiler writer ought to work for Microsoft, and have a go at 
streamlining some of their bloatware.

But I take the point about common sequence recognition. I can believe that 
large sections of the code get reused in different bins. A simple example, 
the checksum routine - every ECU has it, and I'd be surprised if they sat 
down and re-wrote it specially for every implementation. Ditto for the ALDL 
comms stuff.

It's appealing to me, but then I'm just a new kid in town.
Cheers,
Malcolm Robb, LC 0112G

-----Original Message-----
From:	Peter Gargano [SMTP:peter@ntserver.techedge.com.au]
Sent:	Sunday, April 16, 2000 9:35 PM
To:	gmecm@diy-efi.org
Subject:	Disassemblers - Generate compiler code-x's source code?

Okay, if we're talking disassembler features... (please forgive me if
this sounds like thinking out loud...)

Subject: Re: MC68332 disassembler ?
Donald Whisnant wrote

[snip]

> It even has library pattern matching which is
> especially good for disassembling x86 programs -- by pattern matching,
> it will find common library functions and comment them for you -- for
> example, no more wasting hours pouring through several pages of code
> just to find out it is a "printf" -- it will comment it as "printf" and
> hide the code (unless you just want to see it anyway)...

I take it the emphasis of the (IDA Pro's) disassembler is to find
high level code, meaning it could be told enough about a compiler's
output, to allow it to make intelligent choices at converting sequential
assembler into something like if/then/else, etc. structured code?

I find this concept pretty appealing for "hacking" GM code. But there are
at least two hurdles to overcome to capitalise on these thoughts:

  1. Do we know (ie. not speculate) what GM's source was written in?
     I'm assuming that they didn't use assembler, and I'm not speculating
     that they used anything I've heard rumours about. (OTOH, does it
     matter?)

  2. Assuming we know GM's source language, can we find/make a compiler
     that can compile our high level source we can "disassemble" into?

OTOH, perhaps we, as a group, are smart enough to think up with our own
language that compiles back to an original GM style.

For those whose eyes have glazed over - I'm suggesting that it's possible
to write a "disassembler" that converts GM bins to a language "code-x",
and that it's possible to write a code-x compiler to compile code-x
source, and produce P4 (etc.) assembler.

Anyone finds this appealing (or is that appalling?)

PG.

----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo@lists.diy-efi.org