GithubHelp home page GithubHelp logo

moralcode / mars-mips Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 3.0 3.63 MB

a fork of the MARS Mips Assembly and Runtime Simulator with some changes made

License: Other

Batchfile 0.01% Java 94.93% HTML 5.06%
simulator mips-assembly mars assembly simulators

mars-mips's Introduction

MARS MIPS simulator

This is the source code provided with MARS (V4.5, Aug. 2014) downloaded from https://courses.missouristate.edu/KenVollmar/mars/download.htm

This version has been modified from the original and its code is hosted at https://github.com/MoralCode/MARS-MIPS

Changelog

Some modifications have been made from the original source. See https://github.com/MoralCode/MARS-MIPS/releases for the full changelog and binary files for each release.

Custom Pseudo Operations

One of the major changes made to MARS in this repo has been the introduction of a mechanism for configuring a custom path to the "PseudoOps File". This file, which came with MARS as PseudoOps.txt, contains definitions for pseudo operations that substitute for other values. This allows you to create your own "shortcut" instructions, such as extending addi to support 32 bit immediate values (which is the default behavior).

How to create custom files

  1. make a copy of PseudoOps.txt from this repository and read over the documentation at the top regarding formatting of the file.
  2. make any changes, or additions you want. if you are stuck, maybe try creating a test instruction called dead by adding the following line to the file
    dead $t1	addi RG1, $0, 0xdead	#Bitwise NOT (bit inversion)
    
  3. Inside MARS, go to Settings at the top of the page and open the Pseudo Operations... menu. Click the button to change the file path and select the file that you modified in step 2.
  4. Close MARS and reopen it. This causes MARS to load the instructions using your new file instead of the built-in one.

mars-mips's People

Contributors

moralcode avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

mars-mips's Issues

validate PseudoOps files when provided by the user

this is needed to prevent the app from being unable to start up if the user selects a bad file (like a PDF) that's clearly in the wrong format

maybe check for text file types? How much is too much or too little validation?
would "is a text file" and "correctly loads into InstructionSet" enough? or should there be a warning if any single line within the file is not a valid pseudo op?

allow PseudoOps.txt files from outside the jarfile to be used instead of/in addition to

Pseudo operations are defined in a text file PseudoOps.txt. Being able to specify alternate versions of this file, or set up additional custom pseudo operations would be helpful for those looking to customize how MARS operates (for example, if you want to change it to be more "by the book" for teaching purposes, by disabling shortcuts (such as 32-bit values for xori) that MARS provides by default.

This would ideally be implemented in the UI as a file or directory picker dialog and possibly two radio-select checkboxes specifying whether it should override or add to the existing instructions.

make it use the system file picker menu

using a custom file picker dialog makes things harder because it doesn't include user defined shortcuts or other features that users are used to to make their file-saving experience faster and better

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.