Chapter 3 - Assembly Flashcards
Special Purpose Registers
IP SP Flags CS DS ES FS GS
IP
instruction pointer; points to next sequential instruction
SP
stack pointer; addresses stack area
flags
collection of control properties
12 bits
C flag
carry flag; holds the carry after addition or borrow after subtraction
Z flag
zero flag; reports the result of an arithmetic operation as zero
S flag
sign flag; holds the sign of the result after an arithmetic or logic instruction
O flag
overflow flag; indicates overflow as a result from signed arithmetic operations
CS
code segment; holds the programs used by the system
DS
data segment; contains most of the data used by program
data accessed by offset address
ES
extra segment; an additional data segment
SS
stack segment; defines the are of memory used for the stack.
Stack pointer register determines entry point in stack segment
FS & GS
additional segment registers
Real mode
allows the microprocessor to only address the 1st MB of memory. any program can access any area of memory
offset address
used to select a location within a 64kb segment to address a given program
Assembler start of program
.Model small
.stack 100h
Main PROC
mov ax, @data
mov ds, ax