Question

.data A: .word 84 111 116 97 108 32 105 115 32 . text main:​li $v0,...

.data

A: .word 84 111 116 97 108 32 105 115 32

. text

main:li $v0, 1l

li $s0,0

la $s1, A

li $t3, 0

loop: slti $t0, $s0, 17

  beq: $t0, $zero, end

sll $t1, $s0 2

add $t2 $s1 $t1

  syscall

addi $s0, $s0, 1

j loop

end: li $v0, 1

add $a0, $zero, $t3

syscall

/// whats the output of above assembly program

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the output of the given code below::

0x00000000 0x00000000 0x00000000 0x10010100 0x00000000 0x00000000 0x00000000 0x10010120 巾 0x10010000 (.data) Mars MessagesRun

There is issue in printing content of A for the given code.

If want to print content of A in character format than the correct code is as below>>>

.data

A: .word 84 111 116 97 108 32 105 115 32
.text

li $v0,11
li $s0,0
la $s1,A
li $t3,0

loop: slti $t0, $s0, 17

beq,$t0,$zero, end

sll $t1, $s0 2
add $a0 $s1 $t1
syscall

addi $s0, $s0, 1

j loop

end: li $v0, 1

add $a0, $zero, $t3
syscall

output:

ished running (dropped ot gram 1s tinis Clear | DO个 个DD00 $ ( , 048-GO $ ( , 04 8 <@0 program is finished running (dropped of

Add a comment
Know the answer?
Add Answer to:
.data A: .word 84 111 116 97 108 32 105 115 32 . text main:​li $v0,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT