Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hawkw/mipscodegeneration

Experiments with code generation in C and MIPS. Currently targeting the MARSBot graphics turtle that ships with MARS4.4, may later add code generation for other applications.
https://github.com/hawkw/mipscodegeneration

Last synced: 7 days ago
JSON representation

Experiments with code generation in C and MIPS. Currently targeting the MARSBot graphics turtle that ships with MARS4.4, may later add code generation for other applications.

Awesome Lists containing this project

README

        

# MIPSCodeGeneration

![Image of Nathaniel trapped inside a computer](http://i.imgur.com/azol0t9.png "Image of Nathaniel trapped inside a computer")

Experiments with code generation in C and MIPS. Currently targeting the MARSBot graphics turtle that ships with MARS4.4, may later add code generation for other applications.

Python code ~~may find~~ has found its way into the repo ~~later~~ as well.

### Dependencies
+ A reasonable gcc distro (by 'reasonable', I mean that it should have stdlib.h, stdio.h, string.h, and if you're really lucky, math.h and ctype.h)
+ Python 2.7 or later if you want to generate your own fonts and don't like typing

### How to build and run the project

Build object files for the libraries:

```
gcc -c MARSFont.c -o MARSFont.o
gcc -c MIPSCodeGen.c -o MIPSCodeGen.o
```

Build and link the text to MIPS translator:

```
gcc -w -c textToMIPS.c -o textToMIPS.o
gcc MIPSCodeGen.o MARSFont.o textToMIPS.o -o textToMIPS.out
```
Run with: ```./textToMIPS.out```

Build and link the PostScript to MIPS compiler:
```
gcc -c postscriptToMIPS.c -o postscriptToMIPS.o
gcc MIPSCodeGen.o postscriptToMIPS.o -o postscriptToMIPS.out
```

Run with: ```./postscriptToMIPS.out ```

### Using MARSFont to write your own fonts
```c
// this part isn't done yet
// TODO: finish this part
```