System Calls (Cont.)

String Output String I/O Integer Output
       .data
 s1:   .ascii   "abc"
 s2:   .asciiz  "xyz"

       .text
       la  $a0, s1
       li  $v0, 4
       syscall
       .data
 s:    .space   4

       .text 
       la  $a0, s
       li  $a1, 4
       li  $v0, 8
       syscall
 # Enter "12345".
       la  $a0, s
       li  $v0, 4
       syscall
       .data
 val:  .word   0 

       .text 
       li  $v0, 5
       syscall 
       # Enter 12345.
       sw  $v0, val
       la  $a0, val
       li  $v0, 1
       syscall
Output Output Output













      Let’s come back soon before the heavens open (start to rain heavily).