Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 2 . 1 2 Zylab 1 - ALU and Data Transfer Instructions Given an array of 2 integers, write a program to implement the
Zylab ALU and Data Transfer Instructions
Given an array of integers, write a program to implement the following C code that appends elements to the array:
Declaration of variables
int A; Integer array A with the base address pointing to variable A
int a; char b c; short d;
Append array elements
A A A A;
A A;
a A;
b a ; right shift
c a & ; & bitwise and
d a ; left shift
Ab c d; concatenation
Registers Variables
$s A
Addresses Contents
$s A
$s A
You may use any temporary registers from $t to $t or saved registers from $s to $s Clearly specify your choice of registers and explain your code using comments points
Example Test: If the values of $s through $s are initialized in the simulator as:
Registers Data
$s
Addresses Contents
the resultant array is:
Addresses Contents
Note: Use the button under the Registers display to initialize register values for $s and the button under the Memory display to initialize the first two array elements.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started