Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Hello-world-Text/MIPS-Assembly/hello-world-text.mips
Normal file
11
Task/Hello-world-Text/MIPS-Assembly/hello-world-text.mips
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.data #section for declaring variables
|
||||
hello: .asciiz "Hello world!" #asciiz automatically adds the null terminator. If it's .ascii it doesn't have it.
|
||||
|
||||
.text # beginning of code
|
||||
main: # a label, which can be used with jump and branching instructions.
|
||||
la $a0, hello # load the address of hello into $a0
|
||||
li $v0, 4 # set the syscall to print the string at the address $a0
|
||||
syscall # make the system call
|
||||
|
||||
li $v0, 10 # set the syscall to exit
|
||||
syscall # make the system call
|
||||
Loading…
Add table
Add a link
Reference in a new issue