Project 1 Assignment
Point Value Is Double For This Project, 200 Points
Requirements Specification
- Use unsigned values for this project.
- Get two numbers from the user at the PC using the communications package of your
choice. Obviously, this transfer will take place in ASCII.
- The numbers are not to be altered for the rest of the project.
- Convert the string to packed BCD.
- Add the numbers together.
- Convert the sum to an ASCII string.
- Transfer the ASCII results back to the host PC and display the results.
- Subtract the numbers together.
- Convert the sum to an ASCII string.
- Transfer the ASCII results back to the host PC and display the results.
- Determine the size of the program in bytes.
- Determine the runtime and display the results in cycles and milliseconds.
Show your work in how for determining the runtime.
- Do a second version of this program that uses binary values
instead of BCD.
- Compare the BCD version. Determine which is faster. Give your views on which
version was easier to program. If you had developed the two version in version
order, would that have changed your opinion as to which version was easier to
write?
Additional Information
When testing the project, use values that will not overflow or underflow.
Make maximum use of the functions in PAULMON2 for this project.
When you receive a digit character, it is going to be in the range of 30h-39h.
Subtract 30h. When you have two of them, create a packed BCD byte.
When converting the results back, unpack the BCD digits and add 30h to each digit
to get it back to ASCII.
To convert ASCII to binary and back again, you must multiply and divide by 10.
Go to 8052's math
tutorial for help with the division. Instead of using Rn registers,
use external memory for division.
UMBC |
CSEE |