A number of system services, mainly for input and output, are available for use by your program. They are described in the table below.
Register contents are not affected by a system call, except for result registers as specified in the table below.
li a7, 1 # service 1 is print integer
add a0, t0, zero # load desired value into argument register a0, using pseudo-op
ecall