Question: Write an Assembly program that is composed of the followingprocedures / subroutines and instructions:a . An TriangularNumber subroutine that takes a given byte - size

Write an Assembly program that is composed of the followingprocedures/subroutines and instructions:a. An TriangularNumber subroutine that takes a given byte-size number and computesthe corresponding triangular number. The triangular number that corresponds to anumber n is defined as the sum of all integer numbers between 0 and n . You need touse the CMP, JE, and JNE instructions to implement this function.b. In the main procedure, add the necessary instructions and memory allocations todefine an array called A that includes six byte-size unsigned numbers as follows: 5,50,20,4,105,150. You need to use the TriangularNumber subroutine to compute thetriangular numbers that correspond to all elements in array A and store thesetriangular numbers in an array called B. You need to use a loop to implement the mainfunction.
Question 2(25%)- Write an Assembly program that is composed of the following procedures/subroutines and instructions:
a. An TriangularNumber subroutine that takes a given byte-size number and computes the corresponding triangular number. The triangular number that corresponds to a number n is defined as the sum of all integer numbers between 0 and n. You need to use the CMP, JE, and JNE instructions to implement this function.
b. In the main procedure, add the necessary instructions and memory allocations to define an array called A that includes six byte-size unsigned numbers as follows: 5,50,20,4,105,150. You need to use the TriangularNumber subroutine to compute the triangular numbers that correspond to all elements in array A and store these triangular numbers in an array called B. You need to use a loop to implement the main function.
Write an Assembly program that is composed of the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!