Unit 1
Unit 1
Dr. REKHA.K.S.
Associate Professor,
Dept of CS&E,
NIE,MYSURU
Chapter Objectives
is to study
⚫ 21BC
⚫ + 32DE
⚫ Status of each flag after the addition
⚫ 21BC
⚫ 32DE
⚫-
⚫ 0010 0001 1011 1100
⚫ 0011 0010 1101 1110
⚫ 0101 0100 1001 1010
⚫
⚫ CF=0, ZF=0,SF=0, PF=0,ACF=1, ZF=0
⚫
Segment Registers
⚫ Generate memory addresses when combined with
other registers in the microprocessor.
⚫ Four or six segment registers in various versions of the
microprocessor.
⚫ A segment register functions differently in real mode
than in protected mode.
⚫ Following is a list of each segment register, along with
its function in the system.
⚫ CS (code) segment
.
⚫ DS (data) contains most data used by a program.
⚫ Data are accessed by an offset address or contents of
other registers that hold the offset address
⚫ ES (extra) an additional data segment used by some
instructions to hold destination data
⚫ SS (stack) defines the area of memory used for the
stack.
⚫ stack entry point is determined by the stack segment
and stack pointer registers
⚫ the BP register also addresses data within
the stack segment
⚫ FS and GS segments are supplemental segment
registers available in 80386–Core2 microprocessors.
⚫ allow two additional memory segments for
access by programs
⚫ Windows uses these segments for internal
operations, but no definition of their usage
is available.
2–2 REAL MODE MEMORY ADDRESSING
⚫ Only 8086/88 operate in real mode. The 80286
and above operate in either the real or
protected mode.
⚫ Real mode operation allows addressing of only
the first 1M byte of memory space
⚫the first 1M byte of memory is called the
real memory, conventional memory, or
DOS memory system
Segments and Offsets
⚫ All real mode memory addresses must consist of a
segment address plus an offset address.
⚫ segment address defines the beginning address of
any 64K-byte memory segment
⚫ offset address selects any location within the
64K byte memory segment
⚫ Figure 2–3 shows how the segment plus offset
addressing scheme selects a memory location.
Figure 2–3 The real mode memory-addressing scheme, using a
segment address plus an offset.
– this shows a memory segment
beginning at 10000H, ending at
location IFFFFH
•64K bytes in length