Question: PROGRAM 1 Write and execute a program that combines each element of ARRAY 1 with the corresponding element of ARRAY 2 and a constant, as
PROGRAM
Write and execute a program that combines each element of ARRAY with the corresponding element of
ARRAY and a constant, as shown in the example below, with the result written to the corresponding
element of ARRAY ARRAY ARRAY and ARRAY are integer bits each arrays of signed
numbers in a data area. You may use a register for variable An equivalent C instruction sequence might
look like:
Use the "for loop" format demonstrated in Friday's class slides are in Canvas folder Files Class
Notesslides Use the "scaled index" addressing mode to access the arrays. Recall that this uses a
separate "base address" register to point to each array, plus an offset that is the scaled value of the index in
the register you use for k Do not change the base registers.
Use the following test data:
ARRAY
ARRAY
ARRAY
Submit your assembly language source program with the Expressions view with numbers in decimal
format showing the three arrays at the end of the program.
PROGRAM
To exercise shift and addsubtract operators, perform the following calculation:
The four variables are bit signed integers stored in a data section. In this case, you may
not use multiply or divide instructions. All multiplication and division operations should be
performed by shift operators. Note that the constants are all powers of
Use test values:
Submit your source program and the Expressions view showing the final values of the four
variables. Handcalculate the result and note that on the Expressions view next to the final
value of variable
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
