6 ms·
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 fin
by GeneralMaximus 17y ago
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?
- limmeau 17y agoThe 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.html http://www.ibm.com/developerworks/linux/library/l-gas-nasm.h...
- jacquesm 17y agoHere'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.
- klipt 17y agoAlso, check out http://webster.cs.ucr.edu/AoA/ http://webster.cs.ucr.edu/AoA/
- JamesM 17y agoThe 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.