The registers

The registers in use are 32-bits in size, because, well we're discussing IA-32 Assembly

General purpose registers

<aside> 👉 How Are These Registers Addressable?

</aside>

Untitled

<aside> 👉 Understanding The Registers

</aside>

Untitled

Segment registers

The usage of these registers are specific to the memory model used (Flat or Segmented) are only 16-bit in size.

Untitled

EIP register

The instruction pointer, viz. the next instruction which needs to be processed by the CPU. 32-bit in size.

FPU (Floating Point Unit) or x87

EFLAGS register

Used to indicate status of the register

Untitled

Extensions to the x86 instruction set

<aside> 👉 SIMD (Single Instruction Multiple Data) Instructions

</aside>

Untitled

CPU Modes& Memory Models

CPU modes

<aside> 👉 Real Mode

</aside>

<aside> 👉 Protected Mode

</aside>

<aside> 👉 System Management Mode (SMM)

</aside>

Used for power management and security oriented tasks.

Memory models

<aside> 👉 Flat Model

</aside>

The whole address space is linear and can be addressed directly.

Untitled

<aside> 👉 Segmented Model

</aside>

Self explanatory.

Untitled

<aside> 👉 Real-Address Mode

</aside>

A special case of segmented model.

Untitled

Data types in x86

Size Name Instruction
8 bits Byte db
16 bits Word dw
32 bits Double Word dd
64 bits Quad Word dq
128 bits Double Quad Word ddq

Memory addressing

message: db 0xAA, 0xBB, 0xCC, 0xDD

;Move the address of message into the EAX register
mov eax, message

;Move the value pointed by the message into the EAX register
mov eax, [message]

IA-32 Instruction Set

Compilation& Shit