about summary refs log tree commit diff
path: root/mips/chapter-2/exercise-1/e.s
blob: d35702d0bdfbc163bd9ea4b81fd820eaee1973a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# read to and echo t0
	.text
main:
	li	$v0,	5		# read integer to v0
	syscall

	move	$t0,	$v0		# t0 = v0

	li	$v0,	1		# print integer
	move	$a0,	$t0		# at t0
	syscall

	li	$v0,	11		# print character
	li	$a0,	10		# newline
	syscall

	li	$v0,	10		# terminate program run
	syscall