Question: Please translate following C++ code: int v = 0, w = 1, x = 2, y = 3, z = 5; int main(void) { w

Please translate following C++ code:

int v = 0, w = 1, x = 2, y = 3, z = 5;

int main(void)

{ w = z;

v = w + x;

y = w - x;

z = z -1; }

The compiler decides:

v$s0

w$s1

x$s2

y$s3

z$s4

___________________________________________________

.data

.text

Please translate following C++ code: int v = 0, w = 1,

main: addi $s0,$0,0 #v = 0; v + $50 #w=1; w> $s1 # x = 2; x->$s2 # y = 3; y $s3 #z= 4; 2= $54 #w = z; #v = W + X; # y = W - X; # z = Z -1; addi $s3, $0,3 addi $84, $84,-1 sub $s3,$s1,$s2 add $50, $81,$s2 add $s3, $0,3 li $s4, 4 li $82,2 addi $s1, $0,1 move $s 1, $54

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!