CSCI 150, Spring 2003
Home | | Course Schedule | | Assignments | | Lecture NotesDue Friday, April 11, at the beginning of class.
For each of the problems below, use the "assembly language" described in your text, the P88 Machine Assembly Language (described on page 265 and in more detail in Chapter 9).
Problem 1. (essentially problem #1 on page 268)
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 product.
Problem 3. (essentially text problem #2 on page 268).
Write an assembly language program that reads two integers and prints the larger one.
What To Turn In.