Arithmetic Instructions Option for Term Project
CS-350: Computer Organization
© 1999 Charles Abzug
NOTE that your term paper, as well as your slide presentation, must describe in detail your test data, as well as the rationale for your selection of test data.
Multiplication Instructions:
Write a Beboputer Assembly Language program to carry out the functions implied by each of the C language statements listed below. In each case:
Array-Processing Instructions:
Write a Beboputer Assembly Language program to carry out the functions implied by each of the C language statements listed below. In each case:
For (I=1; I<=N; I++)
C[I] = A[I] + B[I]; (A, B, and C are to be related to each other by the rules of Two's-Complement arithmetic.)
N can have any appropriate value within the limits that can be stored in one byte.
Structure your program as a main routine to execute the loop, and a separate subroutine, called from the main program, that performs the calculation for each loop iteration.
During each loop iteration, determine what should be the correct values for the four status flags (Z, N, C, and V), and record them as they would appear in the Status Register in the form of an array D[I].