jaeinkim / MIPS-dollar-sign-autogen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIPS-dollar-sign-autogen

This makes dollar signs automatically in front of registers for MIPS. Please just make sure your code contains ".globl" and your input and output files have a different name or path. Also, registers should have an interval with at least one space or tab.

Usage

To autogenerate dollar signs in your mips file:

$ python mips.py  INPUTFILE \
                  -o FILE --output=FILE 

To see the argument options, run:

$ python mips.py --help

which will print:

usage: mips.py [-h] [-o OUTPUT] input

positional arguments:
    input                 path of the input file

optional arguments:
    -h, --help            show this help message and exit
    -o OUTPUT, --output OUTPUT
                          path of the output file

Result

Input file: Result1

Output file: Result2

To-do

  • Add an option to overwrite the input file

Author

Sooyoung Moon / @symoon94

About

License:MIT License


Languages

Language:Python 100.0%