Beruflich Dokumente
Kultur Dokumente
|
|
8086 CPU has 8 general purpose registers
- the count register (divided into ): Iterative code segments
using the LOOP instruction
Repetitive operations on strings with the REP command
Count (in CL) of bits to shift and rotate
- source index register: Can be used for pointer addressing of data
Used as source in some string processing instructions
Offset address relative to DS
- destination index register: Can be used for pointer addressing of data
Used as destination in some string processing instructions
Offset address relative to ES
- base pointer: Primarily used to access parameters passed via the stack
Offset address relative to SS
|
+ - this flag is set to when there is even number of one bits in result,
and to * when there is odd number of one bits.
, - set to when there is an !"#$!%#& for low nibble (4
bits).
-!#- - set to when result is .!#. For non-zero result this flag is set to *.
- set to when result is !+ $!. When result is /# + $! it is set to *.
(This flag takes the value of the most significant bit.)
/ if set then single-step interrupt will occur after the next
instruction
The trap flag's state is used when using the x86's debugging features.
When set, the x86 processor will execute only one instruction at a time and
then call interrupt 1 (the debug interrupt) to allow an attached debugger to
inspect the program as it executes.
+!/+!0!
- when this flag is set to CPU reacts to interrupts
from external devices.i,e, setting this bit enables maskable interrupt.
m
m
"
#
!
"
BX BH BL Base
Data Group
CX CH CL Counter
DX DH DL Data
SP Stack Pointer
BP Base Pointer
Pointer and
Index Group
SI Source Index
DI Destination Index
!%+2 %+30 +
FFFFF
+!4*,456!6#""!!!+ # 6!6#/1!
DS Data Segment
SS Stack Segment
ES Extra Segment
Examples
CS 3 4 8 A 0 SS 5 0 0 0 0
IP + 4 2 1 4 SP + F F E 0
Instruction address 3 8 A B 4 Stack address 5 F F E 0
DS 1 2 3 4 0
DI + 0 0 2 2
Data address 1 2 3 6 2
Microprocessor System Design 3-13
Fetching Instructions
Where to fetch the next instruction?
8088 Memory
CS 1 2 3 4
IP 0012 12352 MOV AL, 0
12352
Update IP
Ͷ After an instruction is fetched, Register IP is updated as follows:
Ͷ For Example: the length of 78* is 2 bytes. After fetching this instruction,
the IP is updated to 0014