Re: Mac OS X / FreeBSD ASM Resources



Cromulent wrote:

....
Linux differs rather alot from Mac OS X which is pretty much exactly the same as FreeBSD is terms of ASM

http://www.freebsd.org/doc/en/books/developers-handbook/

Chapter 12 covers assembly language...

You'll be using "-f macho" instead of "-f elf" for Mac OSX, if you're using Nasm. One minor difference I'm aware of - "-f elf" allows arbitrary section names, "-f macho" knows only .text, .data, and .bss. Shouldn't be a problem.

The URL for Nasm in the FreeBSD handbook is out-of-date. http://nasm.sf.net - or part of a package called "Xcode" (or similar) for Mac...

Despite the name, the "linuxassembly.org" (a.k.a. asm.sf.net) link that Nathan gave you has info for BSD. In particular, the "asmutils" macros will emit BSD code, given the proper defines. This "should" work on Mac OSX, too.

Let us know how it goes. As you point out, it's not a well-documented area, so any information we can share is a Good Thing!

Best,
Frank

.



Relevant Pages

  • Re: Survey
    ... Can you provide some tips on why I should look at FASM? ... The user base is growing rapidly, though NASM still has a larger user ... I checked quickly but it does not seem to support FreeBSB? ... You might try asking on the FASM board about plans for FreeBSD. ...
    (alt.lang.asm)
  • Re: Concerning RosASM
    ... If you want a nasm example: SDL is that. ... in Nasm that runs on Linux, Windows and FreeBSD. ... Assembly portability between OS's is about as portable as C (as long ...
    (alt.lang.asm)
  • Re: Mac OS X / FreeBSD ASM Resources
    ... The URL for Nasm in the FreeBSD handbook is out-of-date. ... I'll definately check out the ASM website at Sourceforge and the HLA stuff. ... I guess I can study the output of HLA code and see what is what as well as using online sites. ...
    (comp.lang.asm.x86)
  • Debugging symbols with nasm
    ... I'm using nasm to compile some code I wrote. ... with gdb; it reports "no debugging symbols found". ... FreeBSD, nor any other linker. ...
    (freebsd-hackers)