Silver_Smoulder icon

[ASM} Project 1 I/O

Silver_Smoulder | PRO | 10/15/19 03:05:25 PM UTC | 0 ⭐ | 602 👁️ | Never ⏰ | []
text |

480 B

|

None

|

0 👍

/

0 👎

.globl main
.text
 main:
	li $v0, 4 #output the string
	la $a0, inline
	syscall
 	li $v0, 5 #read in the number 
	syscall 
 	move $t1, $v0 # store in t0 (technically unnecessary)
 	li $v0, 4 #output the endstring
	la $a0, outline
	syscall
 	move $a0, $t1 #put the integer into a0
	li $v0, 1 #output the integer
	syscall
 	li $v0, 10 #end the program
	syscall
  .data
inline:
	.asciiz "Please input your integer: "
outline:
	.asciiz "Your output is: "

Comments