7. Writing Standalone Assembly

TODO: Eventually write our own tutorial. These are incomplete.

7.1. Instructions with side-effects

This is one of the more difficult parts about learning intel assembly. TODO: Mention ret, leave, call, push, absence of pop in gcc code, test.

7.2. Opcode Tables

So in order to write assembly, we have to know the instructions available. This table provides a list of the most common integer assembly functions. Another table can be found here. It contains more instructions, but less description of operand types. Be mindful that both of these tables are in NASM syntax, where as GNU AS uses AT&T syntax.

7.3. Using GNU as

The GNU Assembler manual describes how to use GNU as to declare symbols, variables, data, and use other features of as.

Also, we've already linked this tutorial but decided to place it here for completeness.

7.4. Conventions on saving registers

7.5. Using Library Functions

TODO: Writeme. (Use collect2 line from gcc -v)