From 719488f4d4aa0974491e81255b7e3cc3f060c3d3 Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Wed, 6 Oct 2021 21:50:04 -0400 Subject: [PATCH] Added a mips_to_c script to make it easier to use it --- .gitignore | 4 ++++ mips_to_c.sh | 4 ++++ 2 files changed, 8 insertions(+) create mode 100755 mips_to_c.sh diff --git a/.gitignore b/.gitignore index 35213355..f1901f2f 100755 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,10 @@ ucode/ # Linker file is automatically generated, so it should be ignored dkr.ld +# CTX files for mips2c should be ignored as we generate those +ctx.c +ctx_includes.c + # Misc stuff that should be ignored. .*/ diff --git a/mips_to_c.sh b/mips_to_c.sh new file mode 100755 index 00000000..17f5913d --- /dev/null +++ b/mips_to_c.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +ASMFILE=$(find . -type f -name "*$1.s") +python3 ../mips_to_c/mips_to_c.py --context ctx.c -f $1 $ASMFILE > $1.c \ No newline at end of file