This preview shows page 1. Sign up to view the full content.
Unformatted text preview: general-purpose registers have specialized uses:
• EAX is automatically used by multiplication and division instructions. It is often called the
extended accumulator register.
• The CPU automatically uses ECX as a loop counter.
• ESP addresses data on the stack (a system memory structure). It is rarely used for ordinary
arithmetic or data transfer. It is often called the extended stack pointer register.
• ESI and EDI are used by high-speed memory transfer instructions. They are sometimes called
the extended source index and extended destination index registers.
• EBP is used by high-level languages to reference function parameters and local variables on
the stack. It should not be used for ordinary arithmetic or data transfer except at an advanced
level of programming. It is often called the extended frame pointer register.
Segment Registers In real-address mode, 16-bit segment registers indicate base addresses of
preassigned memory areas named segments. In protected mode, segment registers hold pointers
to segment descriptor tables. Some segments hold program instructions (code), others hold variables (data), and another segment named the stack segment holds local function variables and
Instruction Pointer The EIP, or instruction pointer, register contains the address of the next
instruction to be executed. Certain machine instructions manipulate EIP, causing the program to
branch to a new location.
EFLAGS Register The EFLAGS (or just Flags) register consists of individual binary bits
that control the operation of the CPU or reﬂect the outcome of some CPU operation. Some
instructions test and manipulate individual processor ﬂags.
A ﬂag is set when it equals 1; it is clear (or reset) when it equals 0. For More BS-IT Books, Notes & Assignments visit: www.bsit.zxq.net 2.2 x86 Architecture Details
Downloaded From: www.bsit.zxq.net 39 Control Flags Control ﬂags control the CPU’s operation. For example, they can cause the
CPU to break after every instruction executes, interrupt when arithmetic overﬂo...
View Full Document
This note was uploaded on 11/29/2013 for the course CSE 451 taught by Professor Hussein during the Winter '13 term at Fatih Üniversitesi.
- Winter '13