PRINCIPLES OF COMPUTER AND
COMPOSITION
Course Information
Dr. Yiju Wang
School of Aerospace and Engineering, Xiamen University
[email protected] Office: A1-425
CHAPTER 5
CENTRAL PROCESSING UNIT
Chapter5 Central Processing Unit
3
5.1 General register organization
5.2 Stack organization
5.3 Instruction format
5.4 Addressing modes
5.5 Program control
5.6 Characteristics and functions of instruction set
Chapter5 Central Processing Unit
4
5.1 General register organization
5.2 Stack organization
5.3 Instruction format
5.4 Addressing modes
5.5 Program control
5.6 Characteristics and functions of instruction set
Tutorial/Lab
5
1. Try some commands, and find the difference of
Debug and Debug32.
R
A
R32
R16
Tutorial/Lab
6
1. Try some commands, and find the difference of
Debug and Debug32.
R
A
R32
R16
Tutorial/Lab
7
1. Solution
R
Both debug and debug32 have the same function.
A
Debug can not show the instruction format, but debug32
can.
R32
Only debug32 can use it to show 32-bit registers.
R16
Debug32 can use it to show 16-bit registers
Tutorial/Lab
8
1. Solution
R
Both debug and debug32 have the same function.
A
Debug can not show the instruction format, but debug32
can.
R32
Only debug32 can use it to show 32-bit registers.
R16
Debug32 can use it to show 16-bit registers
Tutorial/Lab
9
1. Solution
Tutorial/Lab
10
1. Solution
Tutorial/Lab
11
1. Solution
Tutorial/Lab
12
1. Solution
Tutorial/Lab
13
2. Check True or false for the following instructions
with debug and debug32.
MOV BX,AL MOV AX,[DX]
MOV 100 , CL IN AX,2100H
MOV SS,2400H LDS AX,BX
MOV AX,IP PUSH IP
MOV CS,AX POP CS
MOV [BX],[SI] ADD AX,DS
MOV AX,[BX+BP] INC [BX]
MOV AX,[SI+DI] MUL 20H
MOV AX,[BX-SI] SHL AX,4
Tutorial/Lab
14
2. Check True or false for the following instructions
with debug and debug32.
MOV BX,AL MOV AX,[DX]
MOV 100 , CL IN AX,2100H
MOV SS,2400H LDS AX,BX
MOV AX,IP PUSH IP
MOV CS,AX POP CS
MOV [BX],[SI] ADD AX,DS
MOV AX,[BX+BP] INC [BX]
MOV AX,[SI+DI] MUL 20H
MOV AX,[BX-SI] SHL AX,4
Tutorial/Lab
15
2. Solution
Tutorial/Lab
16
2. Solution
Tutorial/Lab
17
2. Solution
Tutorial/Lab
18
2. Solution
Tutorial/Lab
19
2. Solution
Tutorial/Lab
20
2. Solution
Tutorial/Lab
21
2. Solution
Tutorial/Lab
22
2. Solution
Tutorial/Lab
23
2. Solution
Tutorial/Lab
24
2. Solution
Tutorial/Lab
25
2. Solution
Tutorial/Lab
26
2. Solution
Tutorial/Lab
27
2. Solution
Tutorial/Lab
28
2. Solution
Tutorial/Lab
29
2. Solution
Tutorial/Lab
30
2. Solution
Tutorial/Lab
31
2. Solution
printf(“I love you”);
printf(“I live you”);
Tutorial/Lab
32
2. Solution
printf(“I love you”);
printf(“I live you”);
Tutorial/Lab
33
3. Make a conclusion to this Tutorial.
Tutorial/Lab
34
3. Make a conclusion to this Tutorial.
Tutorial/Lab
35
3. Solution
Generally speaking, Debug32 is more powerful and
more compatible compared with Debug.
Tutorial/Lab
36
3. Solution
Generally speaking, Debug32 is more powerful and
more compatible compared with Debug.