Sponsored links

Sunday 19 May 2013

CS401 Computer Architecture and Assembly Language Assignment 3 Solution Spring 19th May 2013


Question:
We have an array of whole numbers in the main program as follows:
ARRAY :  0,1,2,3,4,5,6,7,8,9,10
You are required to write an assembly language program having a subroutine “SUM_OF_SQUARE”. The subroutine should find out the square of each number and then add them together along with storing the result into a separate data label “SUM” as follows:
Copy “SUM” into “DX” after executing the subroutine.
Provide the final snapshot of AFD that should display the contents of data label “SUM” and “DX”.
Marking Distribution:                                                                                  (Total = 20 marks)
  1. Writing correct subroutine.                                                                 (15 marks)a
  2. Untitled
  1. AFD command used for showing data in data label “SUM”.                        (2 marks)
  2. AFD snapshot showing result of “SUM” and “DX”.                                    (3 marks)

No comments:

Post a Comment