Back to Homework...
Postscript Version
ECE 3223
Homework 12
Fall 1997 Dr. Havlicek
Develop an Intel assembly language program to find the sum and product of two
unsigned
two-digit hexadecimal numbers. You may wish to begin by modifying the sample
program given out in class.
Here is a description of how program execution should proceed:
- First, the program outputs a question mark (?) to the screen.
- Next, the user types two hex digits. As the digits are typed,
they are echoed on the screen. The program reads these two digits and
converts them into a two-digit hexadecimal number.
- The program then outputs a carriage return, a linefeed, and another
question mark to the screen.
- The user then types two more hex digits which are echoed to the screen
and read in as the second two-digit hexadecimal number.
- The program outputs another CR/LF pair to the screen.
- The program prints the sum of the two numbers on the screen in hex
using three digits.
- The program outputs another CR/LF pair to the screen.
- The program prints out the product of the two numbers on the screen in
hex using four digits.
- The program outputs another CR/LF pair to the screen followed by
another question mark.
Execution continues in a loop until the user enters an ``at" sign (@), which
terminates the program.
Here is a sample run:
?12
?34
046
03A8
?@
Each group should turn in a printed assembler listing and a 3.5 inch floppy
disk. The disk should have only two files on it:
- hw12.asm: the assembler source code for the program.
- hw12.exe: the executable module for the program.
DUE: 12/8/97.
Updated: November 20, 1997
Disclaimer
Joe Havlicek
Fri Nov 21 01:13:17 CST 1997