# ------------------------------------------------
# KAAU CS212 - Spring 2007
# Example MIPS assembly program (MAL)
# Dr. Muhammad Al-Hashimi

# program purpose:
# show how to input data using assembler directives

# program output:
# check the DATA window in SPIM starting from addr [0x10010000]
# notice that SPIM by default shows values in hex

# ------------------------------------------------TEXT (CODE) AREA
.text

main:                                 # label program start (instr 0)
						nop												# no op instr (do nothing)
# ------------------------------------------------
Exit:       ori      $2,$0,10         # system call: exit program
            syscall

# ------------------------------------------------ DATA AREA
.data	
            .word 7                    # single unlabelled word
Myword:     .word 8                    # single word labelled (you can use the symbolic addr later)
Myarray:    .word 1, 2, 3, 4, 5        # array MYarray of 5 words
                                       # you can choose any label you like (notice the : after the label)
