68hc11 reverse assembler

Posts: 67
Joined: Thu Jan 14, 2010 1:03 am

68hc11 reverse assembler

Postby sabercatpuck » Sat Feb 18, 2012 4:41 pm

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.

User avatar
Posts: 4559
Joined: Mon Jan 04, 2010 10:23 am

Re: 68hc11 reverse assembler

Postby The1 » Sat Feb 18, 2012 4:50 pm

will be interesting

Site Admin
User avatar
Posts: 6737
Joined: Sat Feb 28, 2009 8:34 pm

Re: 68hc11 reverse assembler

Postby antus » Sat Feb 18, 2012 11:18 pm

Cool, would be interested to see what you come up with :thumbup:
Have you read the FAQ? For lots of information and links to significant threads see here: viewtopic.php?f=7&t=1396

User avatar
Posts: 4991
Joined: Sun Mar 01, 2009 2:54 pm
Location: Perth, WA

Re: 68hc11 reverse assembler

Postby VL400 » Sun Feb 19, 2012 11:36 am

Nice work, hopefully it all comes together - and can handle bank switching :thumbup:

Posts: 67
Joined: Thu Jan 14, 2010 1:03 am

Re: 68hc11 reverse assembler

Postby sabercatpuck » Sun Feb 19, 2012 12:07 pm

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:

Posts: 67
Joined: Thu Jan 14, 2010 1:03 am

Re: 68hc11 reverse assembler

Postby sabercatpuck » Mon Feb 20, 2012 3:43 am

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
Last edited by sabercatpuck on Wed Mar 07, 2012 5:58 am, edited 1 time in total.

Posts: 67
Joined: Thu Jan 14, 2010 1:03 am

Re: 68hc11 reverse assembler

Postby sabercatpuck » Sat Feb 25, 2012 2:25 pm

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.
Attachments
send686af1010C.xls
(714 KiB) Downloaded 391 times

User avatar
Posts: 4991
Joined: Sun Mar 01, 2009 2:54 pm
Location: Perth, WA

Re: 68hc11 reverse assembler

Postby VL400 » Sat Feb 25, 2012 5:24 pm

Looks good so far mate :thumbup:

Also called a disassembler by some too.

Posts: 67
Joined: Thu Jan 14, 2010 1:03 am

Re: 68hc11 reverse assembler

Postby sabercatpuck » Mon Feb 27, 2012 12:07 pm

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.
Attachments
CompareS05S0C.xls
(38 KiB) Downloaded 391 times

Posts: 67
Joined: Thu Jan 14, 2010 1:03 am

Re: 68hc11 reverse assembler

Postby sabercatpuck » Sun Mar 04, 2012 3:38 pm

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.

Next

Return to Tool Development

Who is online

Users browsing this forum: No registered users and 1 guest