Shon Harris, Allen Harper, Chris Eagle, and Jonathan Ness
"Gray Hat Hacking, Second Edition"
eecg.toronto.edu/~amza/www.mindsec.com/files/x86regs.html History of Processors http://home.si.rr.com/mstoneman/pub/docs/Processors%20History.rtf Assembly Language Basics Though entire books have been written about the ASM language, you can easily grasp a few basics to become a more effective ethical hacker. Machine vs. Assembly vs. C Computers only understand machine language??”that is, a pattern of 1??™s and 0??™s. Humans, on the other hand, have trouble interpreting large strings of 1??™s and 0??™s, so assembly was designed to assist programmers with mnemonics to remember the series of numbers. Later, higher-level languages were designed, such as C and others, which remove humans even further from the 1??™s and 0??™s. If you want to become a good ethical hacker, you must resist societal trends and get back to basics with assembly. AT&T vs. NASM There are two main forms of assembly syntax: AT&T and Intel. AT&T syntax is used by the GNU Assembler (gas), contained in the gcc compiler suite, and is often used by Linux developers. Of the Intel syntax assemblers, the Netwide Assembler (NASM) is the most commonly used. The NASM format is used by many windows assemblers and debuggers. The two formats yield exactly the same machine language; however, there are a few differences in style and format: ??? The source and destination operands are reversed, and different symbols are used to mark the beginning of a comment: ??? NASM format: CMD , <; comment> ??? AT&T format: CMD , <# comment> ??? AT&T format uses a % before registers; NASM does not.