Answer to Question #62624 in Assembler for stella

Question #62624
⦁ (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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS