Giter Site home page Giter Site logo

rajatkhanduja / mips-simulator Goto Github PK

View Code? Open in Web Editor NEW
26.0 5.0 21.0 166 KB

It is a program to simulate the behavior of MIPS machine written in C. It can run most of the instructions in the MIPS instruction set

Assembly 11.31% C 77.56% C++ 8.26% Makefile 2.87%

mips-simulator's Introduction

This is a MIPS simulator written in C.

------------------------------------------
Compilation Instructions :-
------------------------------------------
1. cd to the directory.
2. Use make command to compile the source code. The executable file is created as bin/simulator.
3. There is a sample program (written in MIPS) in the bin/folder (bin/multiply_num.asm). 
4. To run the program, use :-
	$ bin/simulator bin/multiply_num.asm

----------------------------------------------------------------------------------------

------------------------------------------
General instructions :-
------------------------------------------

The simulator can run the following subset of the MIPS instruction set in the format described 

	-> add $rd $rs $rt	[immediate value can be given instead of $rs & $rt]
	-> sub $rd $rs $rt	[immediate value can be given instead of $rs & $rt]
	-> and $rd $rs $rt	[immediate value can be given instead of $rs & $rt]
	-> or  $rd $rs $rt	[immediate value can be given instead of $rs & $rt]
	-> slt $rd $rs $rt	[immediate value can be given instead of $rs & $rt]
	-> move $rd $rs 	[immediate value can be given instead of $rs & $rt]
	-> li $rd imm_val
	-> syscall
	-> lw $reg var_name
	-> sw $reg var_name
	-> beq $rs $rt label
	-> j label

mips-simulator's People

Contributors

rajatkhanduja avatar rameshgkwd05 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.