about summary refs log tree commit diff
path: root/mips/chapter-2/exercise-1/n.s
blob: 4394ebf9de1755604875cd9debf83babefabaaef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# s0 *= -1
	.text
main:
	li	$s0,	420		# s0 = 420
	neg	$s0,	$s0		# s0 = -s0

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

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

	li	$v0,	10		# terminate program run
	syscall