Friday, 16 May 2014

CS401 Assignment No 2 Solution Due Date: May 22, 2014

Computer Architecture and Assembly Language Programming (CS401)
 Assignment # 1(Graded)
Total marks = 20
                                                                                  Deadline Date = May 22, 201

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.