
COSC 2410 LAB (Fall 2002)
ASSIGNMENT #3
DUE DATE: 10/17/2002
TIME: At the Start of the Lab
Write an Assembly Program in MASM to perform the following mathematic functions:
1) Addition
2) Subtraction
3) Multiplication
4) Division
for two signed 32-bit nos.
The program should prompt the user to select the mathematic function (from a displayed
menu) and then prompt the user to enter 2 nos. (nos. are entered in signed decimal
format) and then display the result to the user (in signed decimal format) and then prompt
the user to continue by pressing any key.
The mathematic function selection input should also convey some means to exit the
program (Refer to the Example given below).
All the input statements, menus, etc and the output results that are displayed on the screen
must be approximately center aligned with respect to the screen.
Don’t use any high level program structures, libraries, procedures, functions or macros in
your program.
Copy the .asm file on a floppy and print a hard copy of your assembly program and
submit them in a manila envelope.
No Late submissions will be accepted. Also, Indent and comment your program.
Remember the Academic Honesty Policy of the University.
An Example of the Output expected
Mathematic Functions
1) Addition
2) Subtraction
3) Multiplication
4) Division
Select Function (Enter q to exit): 1
Enter first number: -23
Enter second number: +30
Result: 7
Press Any Key to Continue!