By coding in assembly you might not be optimizing as much as you think what's optimal on one machine may be pessimal on another. That will ensure you're writing code that's portable from one release of the OS to the next.įinally, keep in mind that Mac OS X runs across a pretty wide array of hardware - everything from the 32-bit Core Single through the high-end quad-core Xeon. System calls aren't considered a stable API on Mac OS X instead, you always go through libSystem. The IA-32 (x86-32) calling conventions in particular may be slightly different from what you're used to.Īnother thing to keep in mind is that the system call interface on Mac OS X is different from what you might be used to on DOS/Windows, Linux, or the other BSD flavors. You'll also want to take a look at the Compiler & Debugging Guides, because those document the calling conventions used for the various architectures that Mac OS X runs on, as well as how the binary format and the loader work. (That said, if there are specific things you find clunky, please file a bug at Apple's bug reporter - every bug goes to engineering.) Furthermore, installing Xcode will install both the Netwide Assembler (NASM) and the GNU Assembler (GAS) that will let you use whatever assembly syntax you're most comfortable with. Xcode is a suite of tools, only one of which is the IDE, so you don't have to use it if you don't want to. After installing any version of Xcode targeting Intel-based Macs, you should be able to write assembly code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |