What does the following QtSPIM/MIPS code do -


What the following QtSPIM / MIPS code does, the functions of different blocks of code (block1, block2, ...) Describe while referring.

Answer some questions in front of some instructions.

  Block 1: .text Main: li $ s4, 0 la $ a0, input li $ v0, 4 syscall li $ v0, 5 syscall move $ t0, $ v0 # Why we need it is? Block 2: La $ a0, output li $ v0, 4 syscall move $ a0, $ t0 li $ v0, 1 syscall la $ a0, newline # If Newline is replaced by news space defined as "" then output How will change? Li $ v0, 4 syscall Block 3: What to do: $ a0, $ s4 li $ v0, 1 syscall to $ a0, newline li $ v0, 4 syscall slt $ s1, $ s4, $ t0 addi $ s4, $ s4, Transfer 1 to Bgt $ s1, $ zero, no #Why can not we use "beq $ s1, 1, do"? Block 4: Exit: li $ v0, 10 syscall Data input: .asciiz "Input one number:" Output: .asciiz "until I count" Newline: .asciiz "\ n"  

So I identify the code I need help in ... I have the concept that I want to make sure I am finding it properly ... so I have it so far:

  Move $ T0, $ v0 # Why do we need it? --- To store in number T. $ A, Newline # If Newline is defined by Newspace, how will the output change? --- The load address of the string can be printed at $ a0 and if the space in space has been replaced by  

then I can not understand the last one ...


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -