prob1.asm
kjmazidi_Computer_Architecture_for_Coders/Chapter_05_Control Structures/practice_problems_solutions/prob1.asm
# practice program 1
# if (a < 0) a = -a
	.data
a:	.word	4

	.text
main:	lw	$t0, a
	bge 	$t0, $zero, exit
	sub	$t0, $zero, $t0	  # a = -a
	sw	$t0, a 	

exit:	li	$v0, 10
	syscall