Sha256: 00b740f83479b5aac3ce370201ef2423ee62b4513fd0eb42457fac8f4b638473
Contents?: true
Size: 536 Bytes
Versions: 10
Compression:
Stored size: 536 Bytes
Contents
{{works with|MARS}} and {{works with|SPIM}} .data #section for declaring variables hello: .asciiz "Hello world!" #asciiz automatically adds the null terminator. If it's .ascii it doesn't have it. .text # beginning of code main: # a label, which can be used with jump and branching instructions. la $a0, hello # load the address of hello into $a0 li $v0, 4 # set the syscall to print the string at the address $a0 syscall # make the system call li $v0, 10 # set the syscall to exit syscall # make the system call
Version data entries
10 entries across 7 versions & 1 rubygems