Professional Documents
Culture Documents
Lecture 15 21st Feb 2024
Lecture 15 21st Feb 2024
Topic-IV
T1. Barry B Brey, The Intel Microprocessors .Pearson, Eight Ed. 2009. Chapter 4-6, 8
21.02.2024
Types of Instructions
2/26/2024 2
1
2/26/2024
Types of Instructions
• Arithmetic Instructions
• Logical Instructions
2/26/2024 3
2/26/2024 4
2
2/26/2024
2/26/2024 6
3
2/26/2024
2/26/2024 7
R ←M
M←R
R ←R
M← I
R ← I
2/26/2024 8
4
2/26/2024
MOV Instructions
2/26/2024 9
MOV Instructions
2/26/2024 10
5
2/26/2024
XCHG Instructions
Example
XCHG AX,BX
6
2/26/2024
XLAT
XLAT 11010111
7
2/26/2024
Example(contd)….
DS = 2000
00 3FH
Assume BX is pointing beginning location of the table 20000 H
(i.e. BX = 0000 H). 20001 H 01 06 H
20002 H 02 5B H
MOV AL, 05
XLAT 20003 H 03 4F H
After execution AL is copied with byte located by 20004 H 04 66 H
BX + AL = 0000 H + 05 H = 0005 H. 20005 H 05 6D H
PA = DS*10 H+0005 H=20005 H
(i.e. content at location 20005 H is copied into AL = 20006 H 06 7D H
6D H)
MOV AL, 07 20007 H 07 27 H
XLAT 20008 H 08 7F H
20009 H 09 6F H
After execution what is the value of AL = ?
2/26/2024 16
8
2/26/2024
PUSH
It is used for storing data into temporary memory
(stack).
Pushes the contents of the specified register / memory
location on to the stack.
The stack pointer is decremented by 2 , after each
execution.
The source of the word can be a general purpose
register, a segment register, or memory.
The SS and SP must be initialized before this
instruction.
No flags are affected.
PUSH
Store data into LIFO stack memory
9
2/26/2024
ABOS
ATOS
AEOS
2/26/2024 19
2/26/2024 20
10
2/26/2024
2/26/2024 21
End of Lecture 15
2/26/2024 22
11