8086 Registers
A processor register (CPU register) is one of a small set of data holding places that are part of the computer processor. A register may hold an instruction, a storage address, or any kind of data (such as a bit sequence or individual characters). Some instructions specify registers as part of the instruction.1
8086 16bit Registers
- inside cpu
- very fast
- no address
- no type only length of bits from 8 - 64
General Purpose Regsiter
8086 CPU has 8 general purpose registers, each register has its own name:
- AX - the accumulator register (divided into AH / AL).
- BX - the base address register (divided into BH / BL).
- CX - the count register (divided into CH / CL).
-
DX - the data register (divided into DH / DL).
- SI - source index register.
- DI - destination index register.
- They are often used as pointers, but can be used for many of the same purposes as the general registers
- BP - base pointer.
- SP - stack pointer.
- point to data in the machine language stack
Segment Register
- CS - points at the segment containing the current program.
- DS - generally points at segment where variables are defined.
- ES - extra segment register, it’s up to a coder to define its usage. ES is used as a temporary segment register
- SS - points at the segment containing the stack.
Speical Purpose Register
- IP - the instruction pointer. IP register always works together with CS segment register and it points to currently executing instruction.
- Flags Register - determines the current state of the processor. Flags Register is modified automatically by CPU after mathematical operations, this allows to determine the type of the result, and to determine conditions to transfer control to other parts of the program. Generally you cannot access these registers directly.
32bit and 64bit Registers
- 32 bit register start with e eg eax, ebx
- 64 bit register start with r eg. rax, rbx
- x86_64 have additional registers