⦁ (Branch Loop, System call)
Please convert C code to assembly code. Write a new assembly file for this part. Must have: one input (positive int)
#++++++++ C code ++++++++++++++++++++++++++
# if ($t0<=0)
# printf("$t0 is %d\n out of boundary, enter a number > 0", $t0);
# else if ($t0 > 15)
# printf("$t0 is %d\n out of boundary, enter a number < 16", $t0);
# else {
# int $t1 = 0;
# for (i=0; i<$t0; i++)
# $t1 += i*i;
# printf("%d\n , $t1);
# }
#++++++++++++++++++++++++++++++++++++++++++
The “Run I/O” may show like this: (input : 13)
please enter a positive int:13
819
The “Run I/O” may show like this: (input : 0)
please enter a positive int:0
$to is out of boundary enter a number>0
The “Run I/O” may show like this: (input : 16)
1
Expert's answer
2016-10-12T13:30:30-0400
Dear stella, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment