| <<< Parts of the syntax | Index | How to write in Assembly >>> |
.eqv SYSCALL_PRINT_STRING 4
.eqv SYSCALL_EXIT_PROG 10
.data # data segment begins
# Define a greeting message:
Message: .asciiz "Hello World!\n"
.text
# Print the greeting message:
li $v0, SYSCALL_PRINT_STRING
la $a0, Message
syscall # print string
# Return to the operating system:
li $v0, SYSCALL_EXIT_PROG
syscall # exit program
| <<< Parts of the syntax | Index | How to write in Assembly >>> |