Assembly Language in Xcode

I am currently taking a Java course in college and it runs great in Xcode.
I just found out today that I will have to take an assembly language course sometime next year. I talked to the genius at my local apple store and he said that assembly language will work in Xcode, but will be different for PPC and intel macs.
However, he did not tell me how to start in assembly language in xcode. If anyone knows how please tell me and, if possible, supply some sample code for an intel mac so I can test it out.
iBook G4 14 1.2GHz, 1.25GB, iMac Core Duo 17" 1.83GHz 1GB   Mac OS X (10.4.8)  

There is "gas", the GNU Assembler. As a student, you can buy Borland's Turbo Assembler for $130. The more common Turbo C++, Turbo Delphi(s), and Turbo C# are now free.
A MBP with Parallels will pretty much handle anything that will run on a PC. It would be an excellent choice for any programmer.
Still, tele_player is correct. There is no way to tell what platform your assembly class may be using. Few people use assembly anymore and those that do are a little bonkers or just stubborn. You may find yourself learning assembly for the Z80, 68000, or IBM System/360. On the bright side, there are probably emulators for all of those that run on a modern Mac. On the downside, you may still have to submit your assignments on the lab machine.
It is definitely an excellent course to take. There are not enough programmers who know assembly. You will really learn a lot about how a computer runs software and how to write software.

Similar Messages

  • Is it possible to use assembly language..?

    is it possible to use assembly language code with the packager for iphone?

    I hope we can write assembly language in XCode and not in packager for iphone. it supports flash and the script of flash AS3.0

  • Assembly language in X-Code

    I am currently taking assembly language for my undergrad. i have Xcode installed in my computer but i have no idea how to use the xcode for the assembly language. can anyone help me with that.

    Which assembly language are you referring to?
    The documentation from apple can be found here: http://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/As sembler/Assembler.pdf.

  • ASSEMBLY LANGUAGE FILE TO .CLASS --- URGENT!!!!

    Can someone please tell me how to convert a MIPS assembly language file to a .class so I can run it in a JVM? It's URGENT (there's a bus about to hit me and the driver will only stop if I can tell him how to do this).

    Looking for real boobs? I have the best for you. Look
    at www.realandnatural.info you will find the largest
    archive on the net. Enjoy! =)You can't have read many of the posts here. We have quite a set of them ourselves.

  • Using C functions from IA-32 assembly language

    Is it possible to use 32-bit assembly language to call C functions in 64-bit linux?
    Background: I'm learning 32-bit AT&T syntax Linux assembly language programming. The only reason for 32-bit is that's what's covered in the book I have. Some simple examples assemble, link, and execute in Arch 64 using GNU either gcc or as + ld -- with no changes either to code or command line flags.
    The problem: I'm having trouble with C function calls. Even after replacing register names (e.g., edi -> rdi) and mnemonics (e.g., movl -> movq), I find that a program which calls printf and exit never prints anything, and never returns. Hence the question.
    I can post code if needed (it's on my other machine), but this is really more of a general question -- is it possible to call C functions in Arch 64 using 32-bit AT&T syntax, and if so, how.
    Thanks!

    Not even a typo, just confusion. The CPU is an Intel Core 2 Duo -- so it's actually x86-64.
    I realize that NASM is not GAS, but checking the NASM manual helped me figure out a few things about calling 64-bit C functions:
        http://www.nasm.us/doc/nasmdo11.html
    It took a while to figure out how to correctly call printf. The missing clue was here:
        http://www.mit.edu/~6.035/handouts-2007 … convention
    printf reads the number of variable arguments from %rax. In this example, printf is called with no variable arguments:
    # c_functions.s - Calls 64-bit C functions putchar, printf, and exit
    .section .data
    a:
    .byte 'a'
    newline:
    .byte '\n'
    hello:
    .asciz "hello, world\n"
    .section .text
    .globl main
    main:
    movq a, %rdi # used as argument for putchar
    call putchar
    movq newline, %rdi # used as argument for putchar
    call putchar
    movq $hello, %rdi # first argument for printf (i.e., the format string)
    movq $0, %rax # number of variable arguments for printf
    call printf
    movq $0, %rdi
    call exit
    For simplicity, I compiled and linked with gcc (in other words, I let gcc figure out how to properly call as and ld):
        gcc c_functions.s
    If I can figure out how to pass variable arguments to printf, I'll post that. Based on the MIT reference linked above, it sounds like those arguments would be passed in SSE registers.

  • Assembly language on Mac OS X

    I just purchased two books. The first is called "Write Great Code -- Volume 1: Understanding the Machine". It is not about assembly language in specific, just about understanding how computers work on a low level. The other is called "Assembly Language: Step-by-Step" by Jeff Duntemann. I've only read the introduction. It teaches assembly language for Intel-based computers (that's me!), but it also says that it's for DOS and Linux. However, I believe that the reason it says this is because it teaches using the NASM assembler, which, at the time this second edition of the book was published, was only available for DOS and Linux. However, they now have a Mac OS X version of NASM, and I've download it. So, here are my questions:
    1.) Given the information I just gave about this book, I want to make sure that the information and code in it will apply to Mac OS X. It certainly sounds like it will, and I understand that there may be minor differences, but I just want to make sure that I'm in the right ballpark here by using this book.
    2.) Since it teaches NASM, I'm assuming that NASM was the right assembler for me to download. I also just wanted to check and see if there's any other tools I should be downloading. The book mentions a NASM-IDE, but says that it's for DOS only. Is there anything else like this (or anything else at all) that I should obtain?
    3.) Does NASM need to be installed? I went to the NASM website and downloaded the newest version (2.08rc1) for Mac OS X, and it unzipped in my Downloads folder. I've opened the folder and it's a bunch of files that I can't recognize (no install or app files in other words -- just files like rdf2bin, rdf2com, idrdf, and so forth). Is there anything else I need to do? Should I move this folder somewhere? What else do I need to do to get started here? Where would I write my code? How would I run the code? As of right now I have no idea where to go from here, and as you can tell I know nothing about how all this works. Maybe the book will tell me more when I get to the first code sample in the book, but it doesn't look like it, so I just wanted to ask for any information that anyone has time to give about anything relating to getting starting with assembly language and NASM on Mac OS X.
    Thanks in advance for any help. I'd love to hear any input or recommendations on this subject, since it's something I really know nothing about, but you gotta start somewhere!

    Okay, so I found a site to guide me through the installation of NASM on Mac OS X, and it said that 2.08rc1 is a "release candidate" (thus the "rc" part -- yeah, I'm not too sharp), and that I should have downloaded the newest version that didn't have "rc" in it, so I went back and downloaded 2.07. Unlike with 2.08rc1, there wasn't a folder on the website for a Mac OS X version, just DOS and Linux and Win32 and whatnot, but the site that was guiding me said to download the file called nasm-2.07.tar.bz2 (or something like that), so that's what I did. It then gave me instructions for configuring and installing NASM via the terminal, and it worked great! I've compiled and installed NASM, so I've gotten that far, but the rest of my questions in the previous post still apply. For example, I still want to make sure the book I bought will be applicable to assembly language on Mac OS X. Also, I'd like to know if there is anything else (like the NASM-IDE I mentioned in the above post) that I should download. And, finally, I still don't know where to go from here to get started with coding assembly language (I mean, for example, I think I read in my book that you write the code in a text editor -- is that right? How's that work?). Any further input on any of this or anything from the previous post above would be greatly appreciated. Thanks!

  • Assembly Language Help

    I know this proably not the right place to post this topic but I couldn't find anywhere else.
    Basically I am developing a program for high school kids learning assembly language. I am developing it in Java but it has been over 10 years since I have ever done any assembly. I am working through good books and tutorials to refresh my mind. I have come to the example below and got stuck. can anyone spare 5 mins to explain ech line of the following to me in real simple terms. Duke dollars available.
    Load R1,R8
    add R1,16
    Loadind R2,R1
    add R1,8
    loadind R3,R1
    add R3,R2
    sub R1,4
    storeind R3,R1
    Many thanks

    It looks like an addition of operands on the heap of a 32bit processor.
    R8 is a pointer to a heap which has the following format:   +-------+-------+-------+-------+-------+-------+-------+
       |       |       |       |       |   A   |   C   |   B   |
       +-------+-------+-------+-------+-------+-------+-------+
       R8    R8+4    R8+8    R8+12   R8+16   R8+20   R8+24What we want is to execute C=A+B.
    Load R1,R8We are going to have R1 pointing on the place in the heap we are interested in. R8 is probably a register reserved for the heap, which should not be changed, so we copy it into R1.
    add R1,16Move R1 pointer so that it points 16 bytes higher, where A is.
    Loadind R2,R1Load the content of A (pointed by R1) into R2. Note that we are not interested here in the value of R1, but in the value pointed by R1, thus the "ind" for "indirect".
    add R1,8Move the R1 pointer to point 8 bytes higher, where B is.
    loadind R3,R1Load the content of B (pointed bt R1) into R3.
    add R3,R2Add R2 to R3 (the result is stored into R3).
    sub R1,4Move the R1 pointer to point 4 bytes lower, where C is.
    storeind R3,R1Store the result into C.
    Jerome.

  • Custom language for xcode

    Hi,
    Is there a relatively easy way to add a custom language to xcode?  (templates, syntax highlighting, etc.)
    I often work in "R", a statistical programming language and would love to use xcode to write my code.
    Thanks!

    noah977 wrote:
    XCode must have something similar.  Finiding it and deciphering the file format is the tricky part.
    Finding and deciphering isn't all that difficult. The files are here:
    /Developer/Library/PrivateFrameworks/DVTFoundation.framework/Versions/A/Resource s/
    /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
    How to get Xcode to recognize a new language is another story. I have tried to inspire the FORTRAN people to do that since they seem very upset that FORTRAN doesn't have syntax coloring in Xcode4. There is a "Fortran.xclangspec" file in there, but I wasn't able to get Xcode to use it. I admit that I didn't try that hard. If you could figure out how to get FORTRAN syntax highlighting to work, the FORTRAN programmers would really appreciate it, and you could probably hack-in R support as well. Of course, it may not be possible at all, so don't get too excited.
    PS: Make sure to have good backups before hacking on Xcode internals.

  • WHAT IS ASSEMBLY LANGUAGE?

    I know this isn't really related to java.
    What is assembly language? I've heard of it but I'm not sure what it is.

    Simply, it is a language that depends on the particular machine you program.
    High level languages like Java,Pascal, etc ... don't depend from the particualr machine where you program ... you have to run the java program .. or re-compile the Pascal program .... to obtain portability on a particular platform ....
    an assembly (asm) program is not portable ... (since the born of emulators)

  • Assembly code in XCode

    Hello everybody!
    I'm new to XCode. I have the latest version of XCode under Tiger.
    I would like XCode to generate an executable from an assembly code source file. I've searched in many discussions and technical articles in Apple site, but I didn't find anything answering this question.
    I'm sure it must be possible without having to use the line command in a shell...
    Can someone tell me how I should proceed to do this?
    I must add that I have no problem in making C++ or C programs work with XCode.
    Thanks a lot for any help!
    Christophe
    iMac Intel Core Duo 17"   Mac OS X (10.4.7)  

    Hi
    Generally, in Unix based systems, a.out is an executable; however, Mac OS X by default doesn't look in the current folder and double clicking doesn't always work if the executable doesn't use a GUI.
    I suggest you try executing the program by starting a Terminal window, then using a cd command to get to the folder, then typing: ./a.out
    The "./" part tells OS X to search in the current folder.
    Bob

  • Checking Programming Language Version Xcode ide

    Pretty straight forward Topic line. With xcode (2.5) how do I check which version of any particular programming language.   
    But I am asking because I am in the learning stages, and that is a very important question, so I would like a answer that suites all of the programming languages that come default with xcode ide.

    Launch the Terminal application and go to the following directory:
    /usr/bin
    Run the ls command to list the contents of the directory. Look for the gcc and g++ entries. GCC is the compiler Xcode 2.5 uses for C and Objective-C, and g++ is the compiler Xcode 2.5 uses for C++. To see the default version of gcc, run the following command:
    gcc -v

  • How to change the language from english to punjabi in Xcode?

    i am trying to make an app for my religon and it requires me to make those letter sysmblos and i want to know how to change a language in xcode
    Thankyou
    reply please ASAP

    have you activated the Gurmukhi keyboard in system preferences/language and text/input sources and then selected it in the "flag" menu at thr top right of your screen?

  • Can't I get Xcode for leopord for free? or is there any other compiler which supports many languages?

    can't I get Xcode for leopord for free? or is there any other compiler which supports many languages?

    XCode is Apple's official SDE (as in Software Development Environment). It is meant to be used to develop all kinds of full-fledged applications, which are organized as projects. To use it that way, you run the main XCode front end, called appropriately enough Xcode. In the older versions of the product, prior to Lion's v4.3.x, everything was found inside the /Developer folder located at the root of the boot volume. (If you ever move on to Lion, XCode 4 is now an app found in the Applications folder and there is no longer a /Developer folder.)
    An alternate way to access the compilers is via command-line mode in Terminal, on traditional Unix fashion. After installing XCode, it will have set up the PATH variable to point to the appropriate directories so that gcc and its ilk are directly accessible. For instance (note that silverflash is the name of my Mac and my userid is macjuan):
    silverflash:~ macjuan$ which gcc
    /usr/bin/gcc
    silverflash:~ macjuan$ gcc -v
    Using built-in specs.
    Target: i686-apple-darwin11
    Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~22/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
    Thread model: posix
    gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
    silverflash:~ macjuan$ gcc --version
    i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  • How do I set up the XCode Debugger so that it does not drop into asm?

    How do I set up the XCode Debugger so that it does not drop into asm?
    I want to step through my Cocoa Objective-C code and I do not want to see the underlying assembly. When I hit step over, I want it to step to my next line of objective-C code, not to the next assembly language statement.
    99+% of the time, I want to do high level debugging. Don't you?

    I solved my own problem almost immediately after I posted it.
    You use Debug>Toggle Disassembly Display.
    It puts a check mark to drop into assembly, no check mark for no assembly (my choice) and a dash (NSMixedState) for both. It's obvious now.
    Sometimes it can be vexing to find simple XCode features quickly.

  • Using Xcode's C/Cpp Compilers,Make, and Debugger Commands

    Hello,
    I am trying to configure a copy of Netbeans for use on my Macbook Pro running Snow Leopard.  I installed the XCode directories today and I am trying to point Netbeans to the right C Compiler, C++ Compiler, Assembler, Make Command, and Debugger Commands that were provided with XCode.  I have pointed it to the following locations but Netbeans doesn't even understand the   #include <cstdlib>  directive.  I've included the Netbeans parameters that I have to fill in as well as the directory with the Apple llvm XCode compilers.  Thank you so much for your help.
    If someone could please tell me which of these compilers need to go where to allow Netbeans to compile C/C++ code and also help me figure out how to fill out the "Assembler", "Make Command", and "Debugger Command" I would be very grateful.
    Thanks,
    Evan

    Since Xcode puts symbolic links in the standard Unix directories, and since the tools are smart enough to call the correct variants when required, why not just use (assuming from your graphics that you want to use the LLVM frontend to the GNU toolchain):
    /usr/bin/llvm-gcc (C Compiler)
    /usr/bin/llvm-g++ (C++ Compiler)
    /usr/bin/make (Make)
    /usr/bin/gdb (Debugger)
    Or, if you didn't install the Unix development tools and just the Xcode tools, use:
    /Developer/usr/bin/llvm-gcc
    etc, etc.
    This also has the advantage that you won't break your tools every time you update Xcode.
    Finally, you do realize that you only need to provide an assembler if you are actually writing Assembly Language code that needs to be compiled (similarly to how you only need to provide a Fortran compiler if you are going to be writing and compiling Fortran...).

Maybe you are looking for

  • Resetting Aggregated Cleared document

    Hi All, Does any one have any idea how do i reset a aggregated posting document which is cleared. I have tried doing this with the standard Tcode iueedpplotaalc4 by providing Aggregated Payment Document but it only allows me to reverse the payment. T

  • Mail-how to send to a list without entering ea as individual contact?

    I sent email reminders monthly to a group of about 20 email addresses. I don't even know most of the people & there are changes each month with additions & deletions. In Eudora on my old Dell I just had a contact with the whole list in it. Then when

  • How to diable delete button in PO for all users excepting one

    Dear All Please guide how to disable delete button in PO for all users excepting only one. Thanks

  • Date display  in Business one

    Hi Members, I want to obtain the date that is displayed in business one status bar present at  the bottom of business one screen? Can we obtain the date that's present in the business one status bar? Help will be appreciated Thanks and Regards, Venka

  • Need some guide

    Hi SDN, I am new to adobe form. i have to build a complex form, a lot of dynamic operation. i need some suggestion from you regarding my concern. there is  lots of data to be loaded, company code, purchage org, payment term, commodity code...... wher