0% found this document useful (0 votes)
2 views1 page

Lab2 Assembly

The document outlines tasks for a lab session, including analyzing assembly programs and understanding data representation. It instructs students to write programs for summing an array, finding a minimum value, and creating a procedure for computing the product of two integers. Additionally, it references specific assembly instructions and resources for further learning.

Uploaded by

Paladin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Lab2 Assembly

The document outlines tasks for a lab session, including analyzing assembly programs and understanding data representation. It instructs students to write programs for summing an array, finding a minimum value, and creating a procedure for computing the product of two integers. Additionally, it references specific assembly instructions and resources for further learning.

Uploaded by

Paladin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DS302 Lab 2

February 5, 2025

1. Look at the HelloWorld.asm program. Understand how the string constant is stored in
memory.

2. See the code simple.asm and understand how various data types are represented.

3. See the loop.asm program. Look up the instructions bne, j.

4. Load and execute the inpout.asm program. Look up the documentation of the various
system calls used in the program.

5. Write a program to add the numbers in an array and store the sum in a memory location.
Use the .word directive. See page A-49. See also sw instruction.

6. Write a program to find the minimum number in an array and store it in a memory
location. You can use bnez, bge.

7. Write a program that uses a procedure call to compute xy , where x and y are input
integers. Create a procedure that accepts x and y as arguments and returns the result.
Within the procedure, you can use a loop. See the skeleton code proc_skel.asm, and
also the example in the lecture slides on Moodle.

You might also like