diff options
Diffstat (limited to 'mips/chapter-2/exercise-1/r.s')
-rw-r--r-- | mips/chapter-2/exercise-1/r.s | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mips/chapter-2/exercise-1/r.s b/mips/chapter-2/exercise-1/r.s new file mode 100644 index 0000000..c362e64 --- /dev/null +++ b/mips/chapter-2/exercise-1/r.s @@ -0,0 +1,16 @@ +# s4 <<= 3 + .text +main: + li $s4, 420 # s4 = 420 + sll $s4, $s4, 3 # s4 <<= 3 + + li $v0, 1 # print integer + move $a0, $s4 # at s4 + syscall + + li $v0, 11 # print character + li $a0, 10 # newline + syscall + + li $v0, 10 # terminate program run + syscall |