25.12.2012 Views

MIPS Assembly Language Programming

MIPS Assembly Language Programming

MIPS Assembly Language Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.3. MULTIPLES.ASM 73<br />

39 b loop # iterate.<br />

40 endloop:<br />

41 la $a0, newline # print a newline:<br />

42 li $v0, 4 # syscall 4 = print_string<br />

43 syscall<br />

44<br />

45 exit: # exit the program:<br />

46 li $v0, 10 # syscall 10 = exit<br />

47 syscall # we’re outta here.<br />

48<br />

49 ## Here’s where the data for this program is stored:<br />

50 .data<br />

51 space: .asciiz " "<br />

52 newline: .asciiz "\n"<br />

53<br />

54 ## end of multiples.asm

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!