Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to start xcode in assembly.

Hello, I am taking a computer design class and we are learning assembly. I want to fallow my professor as he writes code but don't know how to, or if I can, open and set up xcode so that I can input the commands that the professor gives us. I am compleatly new at this and I cant find anything online that can help me.


I am doing things like:


If given: MOV AX,BX Find its code.


100010 d w mod rrr r/m


100010 1 1 11 000 011


answer: 8BCBH


Can anyone please help me to set up xcode or anything else that will allow me to do this? We are getting into more complicated things and this will realy help me and everyone else in my class fallow along with the profeser.


Thank you.

Xcode-OTHER, OS X Mountain Lion (10.8.2)

Posted on Nov 15, 2012 10:05 AM

Reply
4 replies

Nov 15, 2012 12:03 PM in response to Keith Barkley

He is using the board to do this, not a program. However, he wants us to fallow him using the computer. Only one person in class has been able to do this, however, he uses windows and a program that only runs on windows.


I think you input "MOV AX,BX" and get "8BCBH" as the output.


If Xcode can't do this, or something similer, do you know of any program for a Mac that can?


I think Terminal may be able to do this acording to:


http://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/As sembler/Assembler.pdf


But I have mot been able to get it to work (to set it up).


Again, thank you.

Nov 15, 2012 5:41 PM in response to squall20202

squall20202 wrote:


He is using the board to do this, not a program.

This is what I get:


/Users/jdaniel $ echo MOV AX,BX > /tmp/test.as

/Users/jdaniel $ nasm /tmp/test.as -o /tmp/test.o

/Users/jdaniel $ hexdump /tmp/test.o

0000000 89 d8

0000002


I'm no assembler expert. I haven't used assembly since 1990 and I've never used x86 assembler. I tried to find out what the opcodes should be for this assembly logic and found a number of different answers, some obviously incorrect. (I do remember how to convert hex to binary).

How to start xcode in assembly.

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