mips1

Friday, July 15, 2016

Introduction to Mips Function - killer tutorial site

Let me tell you something before we can start. The function also called the procedure so please don't confuse about it.

. data
      message: .asciiz "Hi there, My name is krish.\n"
.text
    main:
      jal displayMessage     # this is the target

# Tell system to finish program.
li $vo, 10
syscall            




displayMessage:         #this is name of function

li $v0, 4          # This line
la $a0, message   #This line will print the message
syscall

jr $ra        #jump register means go back to main

No comments:

Post a Comment