This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

6809 to 8051 assembly language converter

I have a potential customer that is interested in porting a 6809 application to the 8051. His 6809 code is all assembly. Does anyone know of any tools that can help him do this?

  • Sorry to sound discouraging here. The 6809 is quite a different animal compared to an 8051. I'm not saying with certainty that you will not find the tool you seek, but usually, one encounters converters between processor architectures that are much more similar to one another than these two are. I personally have never run across a 6809-to-8051 converter.

  • Sounds a bit unlikely ot me, too.

    Might it be better to convert to 'C'?

    If your customer has a 6809 'C' compiler, then you could test your conversion on the existing target - otherwise you'll be converting both the hardware and the software at the same time.
    Always best to change just one thing at a time, if you can...!

  • This will not be an exercise that deserves the name "porting". It's called "re-inventing the wheel" or "rewrite from scratch". The only tool I know that can do it is called a human brain, and it's quite expensive to use.

    I.e. you'll have to almost completely ignore that that you have the 6809 code, and start writing new code for the 8051 from scratch.

    To explain this in more figurative terms: what you want to do is turn a beef burger into chicken burger, and that simply won't work. You'll have to follow the processing chain of the beef burger all the way back to the ranch where the cattle was living and convince the rancher to raise chickens instead. Needless to say, you're gonna have lots of resistance to overcome doing this.

  • "you'll have to almost completely ignore that that you have the 6809 code"

    Not true.

    Assuming that the 6809 code is actually working, you can take that as a basis to see what it is doing, and port that to the 8051; Sure, discard (much of) the how of the 6809 code - but don't completely ignore it.

    This is where converting to 'C' may help - as you abstract the what from the details of the how

    I agree, however, that you are unlikely to find any automatic tool to do any of this. :-(

  • assembly conversion is, in my opinion, best accomplished by the following;
    1) work all "headline" comments i.e. comment every process where the process start
    2) make very extensive subroutine headings such as:

    ;;;;;;;; funnysumb
    ;
    ; at call: xxx must contain, yyy must contaimn
    ;
    ;at exit qqq contains, ppp contains
    Then discard all code, leaving the comments
    3) start coding

    Erik