Motorola 68HC11 to STR750F

Discussion in 'Embedded Systems and Microcontrollers' started by bineabble, Dec 20, 2008.

  1. bineabble

    Thread Starter New Member

    Dec 20, 2008
    Hi everyone,
    I have an application that was developed back in the 90's on a Motorola 68HC11 8-bit micro controller written in assembly language. I would like to migrate to the STR750F 32-bit ARM micro controller.

    Where should I start? From what I understand I will have to convert the assembly code into C.

    I was able to get the STR750F board working, built and download the test program (main.c) onto the board, played around with the code a little bit.

  2. futz


    Dec 14, 2008
    Assembly ports to C very easily (and vice versa). Provided you understand both C and HC11 asm, you just go through the asm code sometimes one line at a time, sometimes a few lines at a time and sometimes a subroutine at a time and write equivalent code in C.

    If you don't understand both languages you'll have a difficult time, but you can still do it by looking things up and basically learning HC11 asm on the fly, or learning C while porting. Not the optimum way to do a port. :p
  3. RiJoRI

    Well-Known Member

    Aug 15, 2007
    "Assembly ports to C very easily"
    Apparently, you have never come across some OLD assembler, written for speed or size and NOT for readability. I have tried it a number of times -- as recently as two weeks ago-- and have had to deal with stuff like:
    Code ( (Unknown Language)):
    2.         ifeq     A,#002
    3.          jp       LOP0SHT1
    4.         jmp      LOP0SHT3
    5. LOP0SHT1:
    6.          :
    7.          :
    8.         jmp      LOP0SHT2
    9.          :
    10.          :
    11.         jmp      LOP0SHT4
    12. LOP0SHT3:                  
    13.          :
    14.          :
    15. LOP0SHT2:
    16.          :
    17.          ;
    18.         ifc
    19.                 ret
    20.     :
    21.         jmp   LOP0SHT1
    22. LOP0SHT4:
  4. futz


    Dec 14, 2008
    True enough. :p Maybe I should have said it's not all easy. It's also sometimes very difficult if you've disassembled it and don't know exactly what it does. You have no decent labels until you dig in and start making up your own names for them. Compiler generated code can be pretty strange too.