Professional Documents
Culture Documents
Micro - 8 Instruction (5) 28-11-2021
Micro - 8 Instruction (5) 28-11-2021
(6)
String Group
1
11/25/2022
11/21/2022 3
Algorithm:
NO
ES:[DI] = DS:[SI]
MOVSB OPERAND
if DF = 0 then
SI = SI + 1 , DI = DI + 1
else
SI = SI – 1 , DI = DI – 1
11/21/2022 4
Dr. Mazin H. Aziz 2nd-Class Microprocessor
2
11/25/2022
Algorithm:
NO
ES:[DI] = DS:[SI]
MOVSW OPERAND ES:[DI+1] = DS:[SI+1]
or ES:[DI-1] = DS:[SI-1]
if DF = 0 then
SI = SI + 2 , DI = DI + 2
else
SI = SI – 2 , DI = DI – 2
11/21/2022 5
Dr. Mazin H. Aziz 2nd-Class Microprocessor
Source Destination
DS : SI ES : DI
MOVSB
MOVSW
11/21/2022 6
Dr. Mazin H. Aziz 2nd-Class Microprocessor
3
11/25/2022
Algorithm:
NO
ES:[DI] = DS:[SI]
MOVSB OPERAND
if DF = 0 then
SI = SI + 1 , DI = DI + 1
else
SI = SI – 1 , DI = DI – 1
11/21/2022 7
Dr. Mazin H. Aziz 2nd-Class Microprocessor
4
11/25/2022
Algorithm:
NO
AL= DS:[SI]
LODSB OPERAND
if DF = 0 then
SI = SI + 1
else
SI = SI – 1
11/21/2022 Dr. Mazin H. Aziz 2nd-Class Microprocessor 9
Algorithm:
NO
AX= DS:[SI]
LODSW OPERAND
if DF = 0 then
SI = SI + 2
else
SI = SI – 2
11/21/2022 10
Dr. Mazin H. Aziz 2nd-Class Microprocessor
10
5
11/25/2022
Algorithm:
NO
ES:[DI] = AL
STOSB OPERAND
if DF = 0 then
DI = DI + 1
else
DI = DI – 1
11/21/2022 Dr. Mazin H. Aziz 2nd-Class Microprocessor 11
11
12
6
11/25/2022
13
14
7
11/25/2022
15
16
8
11/25/2022
17
18
9
11/25/2022
19
20
10
11/25/2022
1. Write a program that compares the upper half of the DOS screen with
its lower half and finds the location of the first character-match.
5. Write a program to find the row and column of the first ‘A’ on the DOS
screen and save them at Row and Column, respectively.
11/21/2022 Dr. Mazin H. Aziz 2nd-Class Microprocessor 21
21
22
11