Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nickmonad/mipsy
(Extremely) basic assembler for MIPS32
https://github.com/nickmonad/mipsy
Last synced: 28 days ago
JSON representation
(Extremely) basic assembler for MIPS32
- Host: GitHub
- URL: https://github.com/nickmonad/mipsy
- Owner: nickmonad
- License: mit
- Created: 2013-11-28T04:00:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-06-24T10:29:45.000Z (5 months ago)
- Last Synced: 2024-10-08T19:39:12.273Z (about 1 month ago)
- Language: Python
- Size: 816 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
README
mipsy - MIPS32 assembler
========================This is an (extremely) basic assembler for MIPS32. The end goal is to support all instructions on the standard MIPS [reference sheet](http://inst.eecs.berkeley.edu/~cs61c/resources/MIPS_Green_Sheet.pdf "MIPS reference sheet") (a.k.a. the "green sheet").
### Install and Use
You can either clone the repository and run
```
python setup.py install
```
or
```
pip install mipsy
```To use simply run:
```
mipsy input.asm
```This will produce an output file (out.bin) with the encoded instructions. See the help screen for more info.
### Labels
Labels are now supported. Either "format" is fine.
```
sort: addi $s0, $s0, -20
```
or
```
sort:
addi $s0, $s0, -20
```
will result in equivalent instruction memory.### Goals
* Full assembler functionality, allowing for assembler directives and temporarily unresolved external labels.
* All of the instructions. (At least as much as possible.)### Development
I highly recommend using a virtualenv when developing for mipsy. To "install" mipsy when developing, you can run
```
python setup.py develop
```
to link the development directory to your virtualenv site-package directory.```
python setup.py develop --uninstall
```
will undo those changes, but will not remove the command-line script.### Credit
* Using the [bitstring](https://code.google.com/p/python-bitstring/ "bitstring") library for decimal to binary conversion. (It was easier than writing my own 2's complement converter.)