You are on page 1of 1

Department: Communication and Computer Engineering

Academic level: Second Semester: Second Term 2017/2018


Faculty of Course code :ECO 272
Engineering Corse title: Microprocessor
Instructor: Dr Ayman Elboushi
Eng Azza Eng Mohamed Abdel Ghany
Sheet 5

1. Describe what happens to the status flags as the sequence of instructions that follows is executed.
MOV AX, 1234H
MOV BX, 0ABCDH
CMP AX, BX

2. Implement an instruction sequence that calculates the absolute difference between the contents of AX and
BX and places it in DX.

3. Write an instruction sequence to save the current contents of the 8088’s flags in the memory location at
offset MEM1 of the current data segment and then reload the flags with the contents of the storage location
at offset MEM2.

4. What is the result of executing the following instruction sequence?


ADD AL, BL
AAA
Assuming that AL contain 3316 (ASCII code for 3) and BL contains 3516 (ASCII code 5), and that AH has been
cleared

5.The 2’s-complement signed data contents of AL are –1 and that of CL are –2. What result is produced in
AX by executing the following instruction?
MUL CL
IMUL CL

6. Describe the results of executing the following instructions?


MOV AL, 01010101B
AND AL, 00011111B
OR AL, 11000000B
XOR AL, 00001111B
NOT AL

7. Assume that CL contains 0216 and AX contains 091A16.


Determine the new contents of AX and the carry flag after the instruction SAR AX, CL is executed

You might also like