Needful Software

x86 Assembly

Assembler basics

TODO : what needs to be known to understand what is going to follow. This may be pointers to other documents I think.

Intel x86

Reference manuals

The reference manuals for the Pentium architecture are freely available from Intel's website: TODO : layout problem with website address http://www.intel.com. The 4 documents that are of particular interest in our case are: \begin{enumerate} \item IA-32 Intel Architecture Software Developers Manual Volume 1: Basic architecture \item IA-32 Intel Architecture Software Developers Manual Volume 2A: Instruction Set Reference, A-M \item IA-32 Intel Architecture Software Developers Manual Volume 2A: Instruction Set Reference, N-Z \item IA-32 Intel Architecture Software Developers Manual Volume 3: System Programming guide \end{enumerate}

Segment registers

This is only a very brief overview of the segment registers. More details can be found in Volume 1, in the section called "Registers" (it was section 3.4 in the 2004 version of the manual).

The x86 architecture supports a segmented memory model. In particular the code, the stack and the normal data are put in separate segments. 6 segment registers are used to access these different segments. They are listed below.

CS

This is the code segment. The EIP register contains the linear address within the code segment of the next instruction to be executed.

SS

This is the stack segment. The ESP and EBP registers contain linear addresses within this segment. ESP is the stack pointer.

DS, ES, FS, GS

These are data segments. They are used for everything that is not code or stack.

The instruction pointer

TODO : show a disassmbler example of the instruction pointer.

The first volume contains most of the basic concepts you will need to understand the following chapters.

TODO: a limited number of registers eax,ax, ah al, all the same thing. Specific registers ebp, esp. Segment registers.

TODO: Where to find the documents.