Skip to content

Comment on "Hello, world" in Assembly.

Comments

If you test it under OS X you need to use the OpenBSD/NetBSD instructions using the FreeBSD code but you will use a 'macho' object file.

Yep, "nasm -f macho hello.s && ld -e _start -o hello hello.o" did the trick for me on Mac OS X 10.6

I take it you mean Mach-O?

Mach-O is mach microkernel object format.

http://en.wikipedia.org/wiki/Mach-O

In general, BSD assembler tends to be pretty stack heavy for cultural/engineering reasons. I don't think it ultimately matters all that much if you're fiddling around on your personal machine.

In general, BSD assembler tends to be pretty stack heavy for cultural/engineering reasons. I don't think it ultimately matters all that much if you're fiddling around on your personal machine.

I'm not sure I follow?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.