Assembly Programing on a mac?

Discussion in 'Mac Apps and Mac App Store' started by morikaweb, Feb 6, 2011.

  1. morikaweb macrumors newbie

    Joined:
    May 22, 2010
    #1
    I am going to start university in the fall and the programing course starts with Assembly. So is there such a thing as an assembly compiler for x86 Macs? Or am I once again stuck using windows?
     
  2. Phil A. Moderator

    Phil A.

    Staff Member

    Joined:
    Apr 2, 2006
    Location:
    Shropshire, UK
    #2
    The OSX Development tools include an Assembler - see here for more details.
     
  3. holmesf macrumors 6502a

    Joined:
    Sep 30, 2001
    #3
    GCC may be accessed from command line for this purpose.
     
  4. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #5
    I was under the impression that GCC was a compiler and not an assembler.
     
  5. old-wiz macrumors G3

    Joined:
    Mar 26, 2008
    Location:
    West Suburban Boston Ma
    #6
    I remember assembler from the days before we had compilers.
    However, I'm surprised that they would start a programming course with assembler. I would think they would start with some form of C to at least get started then show what happens under the hood. I remember when I was job hunting in 1999 and had an interview and they asked me what do you do if your C code doesn't work? I said go look at the generated assembler code, which completely freaked them out and they lost interest. When I found a job, I mentioned it to the interviewer and he said "How else can you find strange little compiler bugs?"
     
  6. morikaweb thread starter macrumors newbie

    Joined:
    May 22, 2010
    #7
    Thanks all for your help all. I'm surprised assembly capability is built into xcode, I never thought to look there.

    @ old-wiz
    I too thought it strange starting with Assembly, but at least I have a limited background in programming. I plan to spend the summer learning assembly then it wont be hard come school.
     
  7. holmesf, Feb 7, 2011
    Last edited: Feb 7, 2011

    holmesf macrumors 6502a

    Joined:
    Sep 30, 2001
    #8
    I hope you are 100% sure they are teaching x86 assembly. Many schools pick a simpler assembly language, like MIPS (you would be hard pressed to find an assembly language harder to learn than x86, well okay, maybe not that hard, but it's CISC).
     
  8. morikaweb thread starter macrumors newbie

    Joined:
    May 22, 2010
    #9
    I'm speaking o the professor on the 17'th, ill know then. But even if they teach something simpler, I still want to learn assembly. I want to have a strong grasp of the fundamentals for when I go on to my masters and doctorate.
     
  9. old-wiz macrumors G3

    Joined:
    Mar 26, 2008
    Location:
    West Suburban Boston Ma
    #10
    Virtually all Compilers, whether they are for C or PL/1 or whatever, compile to assembly source code which is then assembled by another component.
     
  10. holmesf, Feb 7, 2011
    Last edited: Feb 7, 2011

    holmesf macrumors 6502a

    Joined:
    Sep 30, 2001
    #11
    It's good you're planning ahead. I'm a 2nd year masters student in Computer Science and I never programmed in assembly after my 2nd year of undergraduate though. I reckon it's really the underlying concepts (loads / stores, jumps, branches, register operations, the program counter and the stack, probably missing some here ...) that is really important and not the assembly language itself.

    Most research projects (when you get up to PhD and MS level) will use a simple assembly language like MIPS because the main goal is to demonstrate feasibility and any unnecessary complications in demonstrating this are undesirable. When they get turned into real products they tend to adopt more complicated instruction sets. One example of this is the RAW architecture, a tile based CPU architecture which used an augmented version of MIPS as its instruction set. When it was adopted as a commercial product (the TileGX) they changed the instruction set to a VLIW approach that is more complex. So key point: even doing research in architecture you might not need to know a complex instruction set.
     

Share This Page