Question: a) (20 points] Write an Assembly program (use EDU-CPU instruction set) to calculate the squares of decimal numbers from 1 to 15, and save the

 a) (20 points] Write an Assembly program (use EDU-CPU instruction set)

a) (20 points] Write an Assembly program (use EDU-CPU instruction set) to calculate the squares of decimal numbers from 1 to 15, and save the squares to an array. Each element of array is 1 byte. Main program should perform a loop, and call the subroutine named CALCULATE_SQUARE, for each number. There are two parameters of the subroutine: Number (as input), and Square (as output) For parameter passing, either use the registers or memory variables. At the end of program, the array should contain the squares like follows: 1, 4, 9, 16, 25, 36, 49, ..., 225

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 Databases Questions!