Computer Science 161.01

HOMEWORK 6:  50 points

Due Wednesday October 10th at 9:30AM

 

YOUR NAME: ___________________________________________________

 

1.       (15 points) Write a VSC-32 assembly language program Echo3 that reads in three numbers and echoes the three back in the same order they were read in.  Test your program at the VSC-32 assembly language site, then write your program in the space provided below.

Check to see for yourself whether the program assembles into the same binary you wrote last week.

 

 

 

 

 

 

 

2.       (15 points)  Write a VSC-32 assembly language program that reads in two numbers x and y, and outputs the value  (x + y) – 5.  Test your program at the VSC-32 assembly language site, then write your program in the space provided below.

Check to see for yourself whether the program assembles into the same binary you wrote last week.

 

 

 

 

 

 

3.       (10 points) Write a VSC-32 assembly language program that reads in three      

numbers x, y, and z  and outputs the value  (x + y) – z.

(You should be able to use problem 2 above as a good starting point, and just   

 modify it).   Test your program at the VSC-32 assembly language site, then write  

 your program in the space provided below.

 

 

 

 

 

 

 

4.       (10 points) Put your thinking caps on and solve the following:  a VSC-32 assembly language program to read in two numbers  x and y

and to output the value   2 (x - y).   Test your program at the VSC-32 assembly language site, then write your program in the space provided below.