UMBC CMSC391

UMBC | CSEE |


Project 1 Assignment

Point Value Is Double For This Project, 200 Points

Requirements Specification

  1. Use unsigned values for this project.
  2. Get two numbers from the user at the PC using the communications package of your choice. Obviously, this transfer will take place in ASCII.
  3. The numbers are not to be altered for the rest of the project.
  4. Convert the string to packed BCD.
  5. Add the numbers together.
  6. Convert the sum to an ASCII string.
  7. Transfer the ASCII results back to the host PC and display the results.
  8. Subtract the numbers together.
  9. Convert the sum to an ASCII string.
  10. Transfer the ASCII results back to the host PC and display the results.
  11. Determine the size of the program in bytes.
  12. Determine the runtime and display the results in cycles and milliseconds. Show your work in how for determining the runtime.
  13. Do a second version of this program that uses binary values instead of BCD.
  14. 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 |