Re: Mac OS X / FreeBSD ASM Resources



On 2008-05-15 09:05:25 +0100, Frank Kotler <spamtrap@xxxxxxxxxx> said:

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

Thanks for the help everyone. 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.

Maybe I should write a blog detailing my progress if there is so little information? Makes it extremely difficult for beginners to get going.
--
"I disapprove of what you say, but I'll defend to the death your right to say it." - Voltaire

.



Relevant Pages

  • Re: cygwin/nasm woes
    ... loops with asm equivalents. ... used it enough to determine that Nasm "did too" run on it. ... confused about what Cygwin "is". ... I know so little about windows I don't even know what I PE executable is. ...
    (alt.lang.asm)
  • 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)
  • asm+C I am doing a bad thing?
    ... got a problem with the use of C combined to asm. ... I use nasm + gcc. ... Rathaxes core developper ...
    (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)