MONT 113G, Spring 2012
Home | | Course Schedule | | Assignments | | Lecture NotesDue Friday, February 17, at the beginning of class.
For each of the problems below, use the "assembly language" described in lecture 20, the P88 Machine Assembly Language.
Problem 1.
Consider the following assembly language program:
IN AX COPY M1, AX SUB AX, M1 CMP AX, M1 JB LAB1 OUT AX JMP LAB2 LAB1 COPY AX, M1 DIV AX, M1 OUT AX LAB2 END
a) What is the output of the above program if the input is 4?
b) What is the output of the above program if the input is 0?
c) Briefly describe how the program works.
Problem 2.
Write an assembly language program that reads two integers and prints their sum.
Problem 3.
Write an assembly language program that reads two integers and prints the larger one.
What To Turn In.