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

Lab 10

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)
8 views1 page

Lab 10

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

Computer Organization and Assembly Language

Lab Task

Question 1:
Local Variables with LOCAL Directive:
Create a procedure that initializes a local variable using the LOCAL directive. Use the variable
to store and print a constant value.

Question 2:
Using Arrays and Loops:
Write a program that defines an array of 5 integers. Use a procedure to calculate the sum of the
elements in the array using a loop. Pass the address of the array to the procedure through the
stack.

Question 3:
Procedure to Find Minimum in an Array:
Create a procedure that finds the minimum value in an array of integers. Pass the array's address
and size through the stack. Use the LOCAL directive to store intermediate values like the current
minimum.

Question 4:
Sorting an Array Using Bubble Sort:
Implement a procedure that sorts an array of integers in ascending order using the bubble sort
algorithm. Pass the array's address and size through the stack. Use local variables for temporary
storage and swapping.

You might also like