Code Monkey home page Code Monkey logo

mips-assembly-language-examples's Introduction

MIPS-Assembly-Language-Examples

👉 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 🤘 :)

Installation and Requirements

You have to download QtSpim because of this program provides compilation your codes. QtSpim - Download

Need to a text-editor. I suggest Notepad++. Notepad++

Simple example of code

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  
	syscall

	li $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
	

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.