Adigrat University: Submitted To Inst. Mehari.G (Ass - Prof) SUBMISSION DATE 23/05/2011 E.C
Adigrat University: Submitted To Inst. Mehari.G (Ass - Prof) SUBMISSION DATE 23/05/2011 E.C
Adigrat University: Submitted To Inst. Mehari.G (Ass - Prof) SUBMISSION DATE 23/05/2011 E.C
COURSE CODE
ASSIGNMENT 1
SECTION ONE
NETWORK FIVE
NO GROUP MEMBERS ID NO
1 MEKONEN HAILE RET/01839/08
2 TESFAYE TEKLU RET/05415/08
3 HELEN HAILE RET/01516/08
4 URGESSA FEYISSA RET/02437/08
5 NATNAEL AMBAW RET /0 /08
i
Table of Contents
CONTENT……………………………………………………………………………………………………………………..PAGE NO
AKNOWLEDGMENTS……………………………….…………………………………………………………………………………1
SUMMERY……………………………………………………………………………………….9
REFFERENCE…………………………………………………………………………….......10
ii
AKNOWLEDGMENTS
This ASSIGNMENT would not have been possible
without all of my friends, and coworkers encouraging us,
helping us, and supporting us.
WE wish to thank the LORD God, for “with man this is
impossible, but with God all things are possible.”
To our coworkers, friends, we could not have done this
without them and we thank them for making this
experience enjoyable.
Finally, we wish to acknowledge instructor MEHARI.G
(ASS.PROF) for providing us this assignment because this
make us know all about the INSTRUCTION SET OF 80386
MICROPROCESSOR.
1
CHAPTER 1
2
displacements and any register as the base or index register while
executing 32-bit code. However, the 80386 uses either 8- or 16-bit
displacements with the base and index registers while executing 16-
bit code. The base and index registers utilized by the 80386 for 16-
and 32-bit addresses are as follows:
16-bit 32-bit addressing
addressing
Base register BX,BP Any 32-bit general purpose
register
Index register SI,DI Any 32-bit general purpose
register except ESP
Scale factor None 1,2,4,8
displacement 0,8,16 bits 0,8,32 bits
CDQ Sign-extend a double word (32 bits) in EAX to a quad word (64
bits) in EDX:EAX
The 80386 includes all of the 8086 arithmetic instructions plus some
new ones. Two of the instructions are as follows:
Instruction Operation
ADC reg32/mem32,imm32 [reg32 or mem32]←[reg32 or
mem32]+32-bit immediate data
+CF
ADC reg32/mem32,imm8 [reg32 or mem32] ← [reg32 or
mem32]+8-bit immediate data
sign-extended to 32-bits+CF
3
ADD Reg32/mem32, Reg32/mem32
reg16, reg8
reg16, mem8
reg32, reg8
reg32, mem8
reg32, reg16
reg32, mem16
There are new push and pop instructions in the 80386 beyond those
of the 8086: PUSHAO and POPAO. PUSHAO saves all 32-bit general
registers (the order is EAX, ECX, EDX, EBX, original ESP, EBP, ESI,
and EDI) onto the 80386 stack. . POPAO reverses a previous PUSHAO.
4
LDS Reg32, Mem16:mem32
LDS reg16, Mem16:mem16
LDS Reg32, Mem16:mem32
There are two new flag control instructions in the 80386 beyond those
of the 8086: PUSHFD and POPFD. PUSHFD decrements the stack
pointer by 4 and saves the 80386 EFLAGS register to the new top of
the stack. No flags are affected. POPFD pops the 32 bits (double
word) from the top of the stack and stores the value in EFLAGS. All
flags except VM and RF are affected.
There are new logical instructions in the 80386 beyond those of the
8086:
d s count
reg16, reg16, CL
mem16, reg16, CL
reg32, reg32, CL
reg32, reg32, CL
mem32, reg32, CL
5
SHLD shifts the contents of d:s by the specified shift count with the
result stored back into d; d is shifted to the left by the shift count with
the low-order bits of d filled from the high-order bits of s.
SHRD shifts the contents of d:s by the specified shift count to the
right with the result stored back into d. The bits in dare shifted right
by the shift count, with the high order bits filled from the low-order
bits of s.
There are new load and move instructions in the 80386 beyond those
of 8086. These are LODS mem32 (or LODSD) and MOVS mem32,
mem32 (or MOVSD).
6
1.2.6 Set Byte on Condition Instructions
7
• The Instruction unit decodes the opcode bytes received from
the 16-byte instruction code queue and arranges them in a
3- instruction decoded instruction queue.
• After decoding them pass it to the control section for deriving
the necessary control signals. The barrel shifter increases the
speed of all shift and rotate operations.
• The multiply / divide logic implements the bit-shift-rotate
algorithms to complete the operations in minimum time.
• Even 32- bit multiplications can be executed within one
microsecond by the multiply / divide logic.
8
and a Paging unit.
• Segmentation unit allows the use of two address components,
viz. segment and offset for relocability and sharing of code and
data.
• Segmentation unit allows segments of size 4Gbytes at max.
• The Paging unit organizes the physical memory in terms of
pages of 4kbytes size each.
• Paging unit works under the control of the segmentation unit,
i.e. each segment is further divided into pages. The virtual
memory is also organizes in terms of segments and pages by
the memory management unit.
SUMMERY
The 80386 includes 32-bit extended register and a 32-bit address
and data bus
The 80386 has a physical memory size of 4GBytes that can be
addressed as a virtual memory with up to 64TBytes
Instruction set of 80386 microprocessor
Arithmetic Instructions
String Instructions
Set Byte on Condition Instructions
Logical Instructions
Data transfer instructions
Flag Control Instructions
9
REFERENCES
GOOGLE
https://pdos.csail.mit.edu
www.ece.ubc.ca
https://en.m.wikpedia.org
https://www.tutorialspoint.com .
www.logix.cz
10
11
.
12