Advanced Microprocessors and Lab – Week 3 Lab 1
Arithmetic, Logic, and Program Control Instructions
Write the procedures for problems 27 and 41, pg. 222.
Include the solutions in a Word document entitled “Lab3_StudentID,” where your student id is substituted in the file name.
Upload file “Lab3_StudentID”.
Lab Template
– This lab template should be used for your lab reports.
Grading Criteria |
Points |
|
All problems or questions attempted |
30 |
|
Final solutions clearly indicated |
10 |
|
Correct numerical solution |
50 |
|
Correct units |
||
Total |
100 |
27. Develop a sequence of instructions that searches through a block of 100H bytes of memory.
This program must count all the unsigned numbers that are above 42H and all that are below
42H. Byte-sized data segment memory location UP must contain the count of numbers above
42H, and data segment location DOWN must contain the count of numbers below 42H.
41. Write a procedure that sums EAX, EBX, ECX, and EDX. If a carry occurs, place a logic 1 in
EDI. If no carry occurs, place a 0 in EDI. The sum should be found in EAX after the execu-
tion of your procedure.