Question: Please help with the following lab / PLEASE INCLUDE SCREENSHOTS if possible. Description of the assignment and the hardware resources used. The List file for
Please help with the following lab PLEASE INCLUDE SCREENSHOTS if possible.
Description of the assignment and the hardware resources used.
The List file for each part of the assignment.
Debugging screen shots showing adequate results.
Your comments on each of the screen shots assumptions and results shown.
Conclusion.
Laboratory Multibytes Integer Addition using Subroutines
Objective: The objective of this laboratory is to get students familiar with the way to extend the
limited arithmetic capabilities of the MC using software and structured coding by the
utilization of appropriate subroutines.
The purpose of this lab is to program the MC to add multi bytes two signed integers. To
simplify our laboratory, we will assume three bytes long bits signed integers. Each of the three
bytes will be defined in three consecutive code memory bytes using the DB assembler directive
and the little endian format. The program will store the answer in three consecutive internal data
memory bytes starting at Ram address H The program will also display the answer on P P
and P staring with the LS Byte in P Port pin P will be set if an overflow takes place,
otherwise it will stay cleared. The implementation will employ two subroutines to make advantage
of the repeated code blocks.
Steps:
First, configure your code and data memory. The MAIN: program starts at code memory
location H The first integer uses code memory locations HH and H in the Intel
MC little endian format least significant byte stored at the low address The second integer
uses code memory locations HH and H
Second, configure parallel port port port and P for output write in the port once
during initialization Write and debug the code to add the two integers and store the answer in
internal data memory locations HH and H Update P P and P to display the same
addition result. Flag an overflow condition on P by setting it
Third, rewrite the program utilizing two subroutines to make use of the repeated code blocks.
Define the created two subroutines sequentially after the main program before the program END
directive.
Check the program for different possible integers cases; two positives, two negatives, negative
and positive. Verify the overall operations. Make sure to test cases producing an overflow. Also
make use of break points in the Keil debugger to enhance and speed up the checkout.
Document and submit your final report along with the well documented list file and adequate
debugging screen shots taken during program execution. Also describe the steps and tools used in
debugging your program.
Explain how the use of subroutines affect the execution time and the space memory
requirements of your executable code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
