News for hackers. Stuff that matters.
Re:Roll Your Own UNIX Clone by GeneralMaximus on Tuesday August 04, 2009 @05:22AM (#740902)
Whenever I think about doing something like this, I always get stuck up on x86 ASM. There don't seem to be many books on ASM out there, and the ones I could find in the bookstores were all written around MASM which, of course, does not work on Mac OS X.

Any ideas?

Re:Roll Your Own UNIX Clone by jacquesm on Tuesday August 04, 2009 @06:16AM (#740937)
Here's a trick to help get you started:

Write a relatively simple C program that does something useful that you understand thoroughly, then generate intermediate assembly code from your C compiler, with optimization turned off.

That way you get a problem that you already know how to solve in a .s listing that you can inspect and modify to your hearts content.

Then try to optimize it, make it run quicker by rearranging stuff.

You'll learn lots that way and the barrier to entry is low.

Re:Roll Your Own UNIX Clone by limmeau on Tuesday August 04, 2009 @05:35AM (#740908)
The difference between Intel/MASM syntax and AT&T/GNU syntax is rather superficial[1], so with a little squinting you can use a MASM book with the GNU assembler. Newer versions of the GNU assembler also come with a directive .intel_syntax so you can write your learning programs in MASM syntax.

[1]http://www.ibm.com/developerworks/linux/library/l-gas-nasm.h...

Re:Roll Your Own UNIX Clone by klipt on Tuesday August 04, 2009 @11:51AM (#741423)
Re:Roll Your Own UNIX Clone by JamesM on Saturday August 08, 2009 @08:58PM (#750112)
The Netwide Assembler (NASM) which I mention in the article frontpage has the same syntax as MASM without the nasty licence. Some of the assembler directives may differ, but 90% of your program will be identical.