The registers in use are 32-bits in size, because, well we're discussing IA-32 Assembly
<aside> 👉 How Are These Registers Addressable?
</aside>
EAX
, their lower 16-bits by AX
, and its even lower 8- bit multiples by AH
(A High) and AL
(A Low)ESP
) and lower 16-bit addressable (SP
) and not any further.<aside> 👉 Understanding The Registers
</aside>
EAX
is the accumulator register and used to store operands and data.EBX
is the base register, and points to dataECX
is the counter register, and is useful in loop operationsEDX
is the data register and acts as an I/O pointerESI
and EDI
are used as data pointer registers for memory locationsESP
is the Stack Pointer Register and used for stack manipulationEBP
is the Stack Data Pointer RegisterThe usage of these registers are specific to the memory model used (Flat or Segmented) are only 16-bit in size.
The instruction pointer, viz. the next instruction which needs to be processed by the CPU. 32-bit in size.
x87
ST(0)
to ST(7)
and they behave like a StackUsed to indicate status of the register
<aside> 👉 SIMD (Single Instruction Multiple Data) Instructions
</aside>
SIMD
was one of the main enhancement done by Intel to the IA-32 ISA, and it contains contains instructions such as MMX
, SSE
, SSE2
, SSE3
etc and these instructions utilise the XMM and MMX registers.<aside> 👉 Real Mode
</aside>
<aside> 👉 Protected Mode
</aside>
Virtual-8086
Mode<aside> 👉 System Management Mode (SMM)
</aside>
Used for power management and security oriented tasks.
<aside> 👉 Flat Model
</aside>
The whole address space is linear and can be addressed directly.
<aside> 👉 Segmented Model
</aside>
Self explanatory.
<aside> 👉 Real-Address Mode
</aside>
A special case of segmented model.
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 |
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]
nasm
(Netwide Assembler) for assemblingld
for linking