Question: 5 . Write an assembly language macro ( called TOTAL ) according to these specifications: a . Accepts a pointer to an array of signed
Write an assembly language macro called TOTAL according to these specifications:
a Accepts a pointer to an array of signed words in any arbitrary low register, ie specified as a parameter;
b Accepts an unsigned word value that indicates the number of array elements in another arbitrary low register, ie specified as a parameter;
c Returns the sum, ie total of array elements in an arbitrary low register, ie specified as a parameter; and,
d Except for the obvious need to modify the register used to return the result, leaves all registers other than the program status register unchanged after the execution of the expanded macro is complete.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
