Page 1 of 2

68hc11 reverse assembler

Posted: Sat Feb 18, 2012 4:41 pm
by sabercatpuck
Figured I would let everyone know that while it has taken awhile I am now well on my way to having a reverse assembler put together so that I can take the address and data line data and recompile it into somewhat readable assembly code. I am basing it in the excel vba language figuring that it was mostly just reinterpereting the data to readable opcodes. The basic structure is together and working well, I just need to put together all of the individual forms for each of the 300+ opcodes. Will post in a few weeks when I have it together, though if anyone wants to see what I have so far I can post a bit earlier.

Re: 68hc11 reverse assembler

Posted: Sat Feb 18, 2012 4:50 pm
by The1
will be interesting

Re: 68hc11 reverse assembler

Posted: Sat Feb 18, 2012 11:18 pm
by antus
Cool, would be interested to see what you come up with :thumbup:

Re: 68hc11 reverse assembler

Posted: Sun Feb 19, 2012 11:36 am
by VL400
Nice work, hopefully it all comes together - and can handle bank switching :thumbup:

Re: 68hc11 reverse assembler

Posted: Sun Feb 19, 2012 12:07 pm
by sabercatpuck
In it's current form I am using the 5 digit hex address so it tracks the address into each individual block, so yes it can see the bank switching, but it wouldn't be hard to use it for a normal 64k of memory too. I think I have about 1/3 of the opcodes coded in so far, but as I get more forms the coding is going faster. I am trying to check my work as I go so I hopefully don't miss something, but no guarantees :thumbup:

Re: 68hc11 reverse assembler

Posted: Mon Feb 20, 2012 3:43 am
by sabercatpuck
We will see if this works. Again, still quite a bit of coding to do, but you can get the idea with it at least. When you open excel you will need to enable macro's. The top button is to do some housekeeping on a new data set imported from my logic analyzer, the second one still labeled command button 2 runs the reverse assembler. I do plan on adding a d column that has a brief English description of the opcodes as well. Once I get it together I do plan on looking in to porting it to open office calc too, but that is for later. I should get it finished up within the next few weeks. However if there are any suggestions for improvements let me know.

Current copy is on Page 2

Re: 68hc11 reverse assembler

Posted: Sat Feb 25, 2012 2:25 pm
by sabercatpuck
Ok, I have made some progress. While not quite complete yet it is far enough along to get through a large chunk.of code. In this go, I pick it up just before and most of the way through processing a mode 1 request for the engine rpm (01 0C).
Oh and since the topic came up, the other fairly common term for this is an inverse assembler.

Re: 68hc11 reverse assembler

Posted: Sat Feb 25, 2012 5:24 pm
by VL400
Looks good so far mate :thumbup:

Also called a disassembler by some too.

Re: 68hc11 reverse assembler

Posted: Mon Feb 27, 2012 12:07 pm
by sabercatpuck
So for those that did not understand the power of using a logic analyzer and reverse assembler I submit this small excel file where I compare the reverse assembly code from the 01 05 draw with the 01 0C draw. Things go fairly close up to line 100, then you start to see the differences pop out. Makes figuring out what is going on much easier. Next up I just need to fill in the forms and pretty it up a bit. I also need to reflash my EEPROM back to stock. I noticed I had a bit of custom code still in there that I was using to get the memory locations read from the internal ROM.

Re: 68hc11 reverse assembler

Posted: Sun Mar 04, 2012 3:38 pm
by sabercatpuck
I got the primary rough coding finished off tonight. Just want to give it a good look over for obvious errors before I post it. I may need to build up a bit of code so I can check out lesser used opcodes.