.data
msg1: .asciiz "Please, type a number:"
msg2: .asciiz "The results is "
.text
.globl main
main:
li $v0, 4
la $a0, msg1
syscall
li $v0,5
syscall
move $t0,$v0
addi $t1,$t0,10
li $v0, 4
la $a0, msg2
syscall
li $v0,1
move$a0,$t1
syscall
'MIPS > 공부' 카테고리의 다른 글
배열에서 값을 찾아 연산하는 프로그램 (0) | 2021.03.05 |
---|---|
n!을 구하는 프로그램 (0) | 2021.03.04 |
레지스터에 값을 저장 후 주어진 연산을 수행하는 프로그램 (0) | 2021.03.03 |