about summary refs log tree commit diff
path: root/lang/mips/chapter-2/exercise-1/j.s
blob: 95eccc7d34e4195793da9b127a16f3f0a503f61a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# t7 = abs(t0)
	.text
main:
	li	$t0,	-420		# t0 = -420
	abs	$t7,	$t0		# t7 = abs(t0)

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

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

	li	$v0,	10		# terminate program run
	syscall