#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Posts
    2
    Rep Power
    0

    M68HC12 GNU assembly


    i am taking a class where we are programming m68hc12 microcontrollers i want to be able to write the code and compile it on my ibook instead of having to go to the lab and doing it there. i know you can write assembly in xcode but im stumped as to where to begin. ex: i have a code hw_7.asm but when i open it in xcode it won't let me compile it.

    thanxs

    daniel
  2. #2
  3. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    Open a terminal, cd to the directory and use the 'gas' command to assemble

    eg.

    gas -o hw_7.bin hw_7.asm

    that outputs to hw_7.bin, compiling hw_7.asm . The traditional extension for asm files is just .s however. You may need to link the file manually with the ld command

    man ld
    man gas

    should be very helpful
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Posts
    2
    Rep Power
    0
    thanks for the help...i tried using the gas command and it tells me command not found i looked up help but no luck i am using bash terminal
  6. #4
  7. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    Ugh, that's not happy. You need xcode installed, but that _ought to_ install GCC, GAS etc.

    I hope people in the mac forum can give you more help, i asked this be moved there.

IMN logo majestic logo threadwatch logo seochat tools logo