CSCI 150, Spring 2003

Home | | Course Schedule | | Assignments | | Lecture Notes

CSCI 150 Homework 8

Assembly Language

Due 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:

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.