Registers

As we start our study of assembly language, there a couple of things to clarify. We need to understand the internals of the CPU better than we do now.

First, let's look at the registers for today's 32-bit registers.

(This is what you will see when you try debugging a program, but let us simplify it back to the 8086/8088.)

It will help to see how we can use these registers in different sizes.

What are all of those registers?

General-Purpose Registers
EAXAccumulator
EBXBase
ECXCounter
EDXData
Segment Registers
CSCode Segment
DSData Segment
SSStack Segment
ESExtra Segment
FSExtra Segment
GSExtra Segment
Index Registers
ESISource Index
EDIDestination Index
EBPBase Pointer
Special Registers
EIPInstruction Pointer
ESPStack Pointer
Extended Registers Unused in CMSC313
Flag Registers
BitCodeMeaning
0CCarry
1xundefined
2PParity
3xundefined
4AAuxiliary Carry
5xundefined
6ZZero
7SSign
8TTrap
9IInterrupt
10DDirection
11OOverflow
12xundefined
13xundefined
14xundefined
15xundefined

Flags

Flags are either Control Flags or Status Flags
Control
Control flags allow the programmer to control the CPU's operation.
Status
This bits reflect the outcome after of arithmetic and logical operations.

Digital Logic View

Drawing of 4-bit Register