M6811DIS Disassembler

Donald Whisnant dewhisna at ix.netcom.com
Tue Jul 13 15:09:03 GMT 1999


Tom...

The problems lie in just how well optimized some of the GM code
really is -- at least in these older PCM's...  Most of it was
written by GM in Modula (not C, not Basic, etc)...  Looking at the
code, you don't see the typical stack frame, for example, that you
see for C -- so identifying local variables and separating code
functionality becomes more difficult...  In fact, I've been impressed
at how well their compiler has optimized things -- there are a few short
comings, but much of it couldn't be improved upon if done by hand -- not
much anyway...

Now their newer PCM's, especially those with the 68332 family of processors,
are a different story -- that code could be re-written and half of it
removed! ...  They've fallen to the over power processor and too
much memory syndrome...

The newer code could probably be decompiled into C or similar, but
the older code will be much more difficult...

Donald Whisnant
dewhisna at ix.netcom.com


>
>Date: Mon, 12 Jul 1999 21:38:08 -0500
>From: Tom Sharpe <twsharpe at mtco.com>
>Subject: Re: M6811DIS Disassembler
>
>I have wrestled with this also. Generated assembler is hard to understand,
>especially without comments, unless you work with it daily. As you are
>planning to identify patterns, how about translating some of them into
>macros and "shorten" the code. A replacement of generated labels with
>understood abbreviations would also be helpful.
>
>If you could also identify pseudo code, then translating the code into C or
>BASIC would be easier. By this I mean identify  "if { } then {  } else {
>}"  and create the appropriate comments/code snippets.  With "if A > B then
>x,y,z ." compilers often generate "compare a,b if  <=  branch to C  x,y,x
>Label C. " . It gets real messy with compound if 's then else's but the
>original code is easy(ier) to follow.
>
>With a small amount of work, I'll generate a "GMECM-Basic" compiler w/macro
>assembler for the HC11, (I have most of it done) just give me the macros and
>pseudo code (like "search tableX returning valueY").  We can then change the
>code at will and generate new BIN files for downloading. We can change more
>than the tables......   Tom Sharpe
>
>PS Been doing this for 30 years, It's easy if the code is readable and
>understandable....
>
>I'm also trying to do a CPU transplant of an HC11 with an HC12 (faster, 16
>bit with good C compiler support and BDM interface) to make programming
>easier.
>




More information about the Gmecm mailing list