Egyptian Academy for Engineering and Advanced Technology
Electrical Engineering Department
Academic level: 2 Semester: Spring 2018/2019
Course Title : Microprocessor & its applications Course code :ECO 272 Sheet (7)
Q1: Given the following data:
IP=0101 h, CS=1100h, DS=1200 h, AX=15AC h, SUM=1234h, BX=11AA h, [1235] contain 00, [1234] contain FF, [200] contain 20h, [201] contain 00h, [202] contain 00h, [203] contain 13h. Show the memory and register contents before and after Execution of each instruction. a. XCHG [SUM], BX Assuming the machine code 87, 1E, 34, 12. b. LDS SI, [200H] Assuming the machine code C5, 36, 00, 02. Q2: What is the result of executing the following instruction sequence? ADD AL, BL AAA a. Assuming that AL contains 32 hand BL contains 34 h. b. Assuming that AL contains 06 hand BL contains 05 h.
Q3: What is the result of executing the following instruction sequence?
ADD AL, BL DAA a. Assuming that AL contains 27 h and BL contains 35 h. b. Assuming that AL contains 82 h and BL contains 55 h. c. Assuming that AL contains 77 h and BL contains 46 h. Q4: Perform a 32-bit binary add operation on the contents of the processor’s register. (DX:CX) = FEDCBA98 h, (BX:AX) = 01234567 h. Q5: 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
Q6: Describe the results of executing the following instructions?
MOV AL, 01010101B AND AL, 00011111B OR AL, 11000000B XOR AL, 00001111B NOT AL