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!

Similar Messages

  • 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.

  • 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.

  • Typing Indian Languages on Mac OS X

    I have come across a few questions on the forums here asking for Phonetic Transliteration using schemes such as Baraha for different Indian Languages on Mac OS X. Unfortunately, no good answers were given (probably none existed) and the forums are now archived. Having lived through the dark days of trying to use various non-phonetic QWERTY keyboards, I decided to write my own open-source Input Method Engine (IME) called LipikaIME: https://github.com/ratreya/Lipika_IME.
    LipikaIME supports Bengali, Devanagari, Gujarati, Gurmukhi, Hindi, Kannada, Malayalam, Oriya, Tamil and Telugu scripts using ITRANS, Baraha, Harvard-Kyoto, Barahavat and Ksharanam transliteration schemes. Mappings are documented here: https://github.com/ratreya/Lipika_IME/wiki. Additionally, you can add your own language or transliteration scheme using LipikaIME's configuration files. You can also use GoogleIME's SCM file format (http://www.google.com/inputtools/windows/canonical.html) to introduce your own transliteration scheme.
    LipikaIME works on Mac OS X 10.8 and above. You can download the installer here: https://s3.amazonaws.com/sanskrit/LipikaIME.pkg. This application is not in the Mac AppStore because custom installers, which are required to get any IME to work on OS X, are disallowed - some day I may think of a way to work around this.
    namaste
    ನಮಸ್ತೆ
    नमस्ते
    நமஸ்தெ
    నమస్తె
    നമസ്തെ
    নমস্তে
    નમસ્તૅ
    ਨਮਸ੍ਤੇ
    ନମସ୍ତେ

    Thanks for posting this extremely useful info.  I have put an article on my blog about it too:
    http://m10lmac.blogspot.com/2014/05/new-input-methods-for-indic-scripts.html

  • 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 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.

  • 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)

  • Supportting languages in mac os x 10.4

    Hi Guys
    Does mac os x 10.4 support multi-languages?
    Does it come with different versions according to the languages or it's only one package sold in the whole world?
    Thanks
    PowerBook G4 1.5 15"   Mac OS X (10.3.9)  

    Welcome to Apple Discussions.Does mac os x 10.4 support multi-languages?Yes, but you need to choose the languages you want to use.
    Does it come with different versions according to the languages or it's only one package sold in the whole world?
    One version loads all languages, then on initial setup you choose your default language.
    See this support article
    -mj
    [email protected]

  • Install Japanese language for MAC users

    I have found several websites that tell how to install Japanese language software with PC. 
    But I have never found one for MAC.
    Please somebody help me...  I am a MAC user and need to make my BB 8330 able to show Japanese...
    Thanks. 

    Unfortunately at this time all software updates have to be done using a PC. Unless you have Parallels or other type of software that you can use to load Windows OS on your Mac. Then you can do the upgrade
    If someone has been helpful please consider giving them kudos by clicking the star to the left of their post.
    Remember to resolve your thread by clicking Accepted Solution.

  • Will Adobe flex support Arabic language on Mac OS

    Hi,
    We have developed a webapplication using Adobe Flex SDK 3.2. the content in the application is in arabic language. Unfortunately the arabic language is unreadable if viewed on Mac Os. but the same arabic language/text is perfect and accurate if viewed in Windows OS. kindly help us in finding a solution.
    What we need is the arabic text should be accurate and readable if viewed in Mac OS.
    Thankyou
    regards
    sandeep

    The legacy TextField class in Flash Player -- which is the basis for all text display in Flex 3 components -- does not properly support right-to-left or bidirectional languages such as Arabic. However, the newer Flash Text Engine (FTE) APIs in Player 10, and the Text Layout Framework (TLF) library that is built on top of FTE, support bidirectional text.
    If you use Flex 3.X you will have to write directly to the FTE or TLF APIs. If you use Flex 4.X, you can just use the Spark component set, which use FTE/TLF for text display. The MX components in Flex 4 still use TextField by default but can be configured to use FTE/TLF.
    Gordon Smith
    Adobe Flex SDK Team

  • Cs4 Design premium language swap (Mac)

    Hi there,
    I've got a Cs4 in English and I want to swap language for French (for all apps) on the same Mac.
    If I deactivate my license then reinstall Cs4 in French, will my serial number work ?
    I mean when I buy a licence, can I choose any languages when I settle Cs.
    Thanks for your help.

    serial numbers are language specific so you won't be able to use your english serial number for a french version.
    if you can get the french language packs for your programs, you could rig them to display french.

  • Using Latin Language for Mac

    I figured out how to change the language of my Mac in System Preferences. However, I want to use the default language as Latin, which I can't seem to get to work. I checked it in the "Edit List" popup thing so it appears in the list on the left. I rearrange the list so "Latina" is top, yet even after logging out/back in, it's in English. I tried this with Spanish, just to make sure I wasn't doing something wrong. I ordered "Español" as the top option, and it worked just fine. So, what do I have to do to get Latin to work? Is there a language pack somewhere that I need to install? Or what? Thanks.

    So, what do I have to do to get Latin to work?
    You can't. There are 130+ languages on that list, but OS X only comes in 18 of them, and Latin is not among them. The list is provided in the tech specs:
    http://www.apple.com/macosx/techspecs/
    Do you know of any application that has a Latin version?

  • Change language in mac app store

    Is there any way to select the language in the Mac App store without changing your billing country?
    Specifically, I am an expat living in Netherlands with a Dutch address but would like to use the App Store in English.
    The only option seems to be to change the country to the UK, but if I do that I cannot purchase anything because I have no billing address there.

    Hi ...
    You can change the country by clicking the round flag icon bottom right corner of the App Store window.
    For purchasing your credit or debit card credentials must be associated with the same country where you reside.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article
    FYI:  iTunes and Mac App Stores bililing policies are the same.

Maybe you are looking for

  • 10.7.2 with AD Mobile User Accounts

    Hi All, I am experiencing a very strange issue. I am build MacBook Air operating environments, that bind via a script to a 2008 AD Server. The problem I am experiencing is when the system/Mobile account is removed from the network, the user can no lo

  • Help me with XSLT 2.0

    I tried to transform from xml to xml using xslt2.0 on oracle 10g r2. Based on the fact that whenever I added xslt 2.0 features such as "xsl:function","xsl:for-each-group" to stylesheet, oracle 10g gives me an error "LPX-00602: Invalid child element '

  • Multiple markers in Inventory management

    Dear genuins   Is it possible to set multiple markers in the Inventory management in BW system? I mean, markers are set on 1st every month, so that for example: we set marker on 2007-07-01,2007-08-01, when calculate the stock for 2007-07-20, system w

  • My Macbook Pro 13" lost Internet connection last night. Why?

    My Macbook Pro 13" lost Internet connection last night. It's still out today, but my mother's Windows machine still gets it just fine. What happened to my Mac? The folks at Comcast told me it's a problem for Apple to fix. I'm hoping someone here can

  • How to completely embed a font

    When I save as a pdf, no matter what settings I use, I only get a subset of the font used embedded  in the resulting pdf. Does anyone know of a way to do this? I have tried using pdf/x1a. I have tried using an export set from Indesign that does embed