Coding assembly on Mac

http://images.forstudent.com/is/34screen.jpg

Hi... I'm a university student and my current subject is about x86 intel Assembly. The teacher provides the Assembly compiler and debugger for us and they run nice on the editplus source code editor but it will only run on PC platform. Try to see the link above. I would like to write, compile and debug x86 assembly codes on my MBP. Is there any way to do that ? I hope we can also do this on MAC. I hate calling all the compilers and writing down all my codes on the Terminal also so, I'm gonna need an assembly compiler that comes with a source code editor. Any help would be appreciated

Andy

Mac Book pro 15", Choose, Core 2 duo 2.16GHz Ram-2GB

Posted on Aug 8, 2007 8:07 AM

Reply
5 replies

Aug 11, 2007 1:45 PM in response to MBP VS VAIO SZ

EW Vista Yucky.

The answer to your question is yes and no at the same time. You cannont natively Compile (since this is assembly code its assemble) x86 code with nasm on the OSX side of things. This is mainly because there is not an assembler for mac, but there is a way to do this. This is basically what I did last semester in my x86 class. I got a copy of Parallels and XP from the compsci dept at the university (just the windows i had to buy Parallels) and installed all my x86 stuff there. That way if you have something you are using in class its the same for your mac. As far as an assembler with an ide i think you are out of luck we always used notepad then compiled with a bat file. So basically you would just have to set your bat file to point at your .asm file and have one for a full compile and one for a debug so you can do both.
If you do not know bat files are easy to make just open notepad and when you save just move the box at the bottom to all files and name it *.bat.

I hope this helps

Tom

Aug 12, 2007 10:39 PM in response to MBP VS VAIO SZ

Here's a link that will get you started:

http://untimedcode.com/2007/5/20/learn-nasm-assembly-on-mac-os-x

nasm should be installed with everything else when you install xcode. However, beware... if your teacher is expecting to get code from you that will run on Windows then you're out of luck. Likewise, if you are expecting to run example code that your teacher gives you, then you're out of luck. The systems calls are all different because OS X is unix (Leopard actually is certified as unix now) and Windows is... well... Windows. So the simplest of "Hello, world!" apps that your teacher shows you running on windows will not assemble and run on the Mac (and vice versa).

On the other hand, if your teacher doesn't care about running it Windows as long as you can demonstrate the code assembling and running on your Mac, then go for it.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Coding assembly on Mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.