# Program: Hello, World! x 10 # Prints "Hello World!" ten times to output .text # Start of code section main: # Execution begins at label "main" addi $t1,$0,10 loop: addi $v0, $0, 4 # system call code for printing string = 4 la $a0, Greeting # load address of string to be printed into $a0 syscall # call operating system to perform operation; # $v0 specifies the system function called; # syscall takes $v0 (and opt arguments) subi $t1,$t1,1 bne $t1,0,loop # exit gracefully addi $v0,$0,10 # load exit syscall # exit .data # data declaration section; specifies values to be stored # in memory and labels whereby the values are accessed Greeting: .asciiz "Hello, World!\n"