loading...

CS401 Computer Architecture and Assembly Language Assignment 2 Solution 2014

Question:

Write an assembly language code to write subroutines for the following two binomial theorems:

SROUTINE_SUM: SUM_SQ = (A+B)2 = A2 + B2 + 2*A*B

SROUTINE_DIF: DIF_SQ = (A-B)2 = A2 + B2 – 2*A*B

Where SUM_SQ, DIF_SQ, A and B are predefined data labels while SROUTINE_SUM and SROUTINE_DIF are the subroutine names.

Testing values for A and B are 3 and 2 respectively.

You have to attach the snapshot of AFD debugger showing the calculated values in SUM_SQ and DIF_SQ.

DOWNLOAD SOLUTION HERE
loading...