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 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.