Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ffcabbar/mips-assembly-language-examples
:heavy_check_mark: Examples to learn Mips
https://github.com/ffcabbar/mips-assembly-language-examples
assembly assembly-language assembly-language-programming mips mips-architecture mips-assembly qtspim
Last synced: 2 months ago
JSON representation
:heavy_check_mark: Examples to learn Mips
- Host: GitHub
- URL: https://github.com/ffcabbar/mips-assembly-language-examples
- Owner: ffcabbar
- Created: 2019-06-19T11:34:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-01T21:14:31.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T20:43:03.756Z (2 months ago)
- Topics: assembly, assembly-language, assembly-language-programming, mips, mips-architecture, mips-assembly, qtspim
- Language: Assembly
- Homepage:
- Size: 12.7 KB
- Stars: 51
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MIPS-Assembly-Language-Examples
:point_right: There are lots of examples here about MIPS Assembly Language. Level of examples from scratch.İf you want to know MIPS, you can use these examples. These examples easy to learn. End of the topics, you can create a calculator or sorting algorithms easily.I hope they help someone out there. Good luck Everyone :metal: :)## Installation and Requirements
You have to download QtSpim because of this program provides compilation your codes.
[QtSpim](http://spimsimulator.sourceforge.net/) - DownloadNeed to a text-editor. I suggest Notepad++.
[Notepad++](https://notepad-plus-plus.org/download/v7.7.html)## Simple example of code
```bash
data
string1: .asciiz "Enter a number:"
string2: .asciiz "Enter the secon number:"
string3: .asciiz "Sum:"
endLine: .asciiz "\n".text
main:li $v0 , 4 #print string1
la $a0 , string1
syscallli $v0 , 5 #read integer
syscall
move $t0,$v0 #Girdiğimiz integer değeri temporary(geçici) değere akttardık.
li $v0 , 4
la $a0 , endLine #Boşluk vermek için.
syscall
li $v0 , 4
la $a0 , string2
syscall
li $v0 , 5
syscall
move $t1,$v0
li $v0 , 4
la $a0 , string3
syscall
add $t2,$t1,$t0 #İki tane yazdığımız integer değerleri toplayıp $t2 temporary değere aktardık.s
li $v0, 1 #print integer
move $a0, $t2 #Temporary değeri a0 a aktardık.
syscall
li $v0, 10 #exit
syscall
```