Skip to content

A MIPS assembler/simulator written in Python

Notifications You must be signed in to change notification settings

RogerGee/pymips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pymips
--------------------------------------------------------------------------------

Pymips is a MIPS assembler/simulator written in Python. It implements a subset
of the MIPS instruction set (pretty much everything except floating-point
arithmetic). The program functionally operates either as an assembler, simulator
or both in one step. On *nix systems assembled programs can be executed as if
they were native binaries (but they aren't really).

--------------------------------------------------------------------------------
Installation:

 -  *nix systems  -

To install pymips, copy the source file 'pymips.py' to a directory referenced by
the PATH environment variable of your shell. Name the copied file 'pymips'. Make
sure the file is marked executable (it should be if you clone this repository).

Now you should be able to execute pymips directly and execute compiled pymips
programs. For example:

    $ pymips
    pymips: error: no input program file

 -  Windows systems  -

If you don't have Python installed, you can download the frozen version of the
script from the Releases page on Github. Extract the file pymips.exe from the
Win32 release and place it somewhere in your path. It should run as a standalone
binary executable.

Alternatively, if you have Python installed and depending on your Python
installation, you may be able to simply place 'pymips.py' in your shell's PATH
somewhere.

Now you should be able to execute pymips:

    > pymips
    pymips: error: no input program file

--------------------------------------------------------------------------------
Documentation:

Documentation is included in the repository under doc/. You will need to compile
the LaTeX sources. Compiled versions are also available in the Release archives
for each platform available on GitHub.

To compile the latex document, you may need the following style definition that
extends the 'listings' package. The file is mips.sty and is located here:
https://gist.github.com/walkie/4591789.