- I'm making a C compiler
- 01 Oct 2014 09:25:10 pm
- Last edited by Unknownloner on 01 Oct 2014 11:11:18 pm; edited 2 times in total
Just so we're clear, this is nowhere near complete, thanks
I'm working on a C compiler to compile C code to assembly for the ti83+ series and ti84+CSE series in haskell. I don't know much about making compilers, and I don't know much about haskell either, so I'm using this as a way to learn about both. Don't expect optimized code for awhile, the first step is getting it working
If you want to check it out, code is here. The repo contains an example input file 'test.c'
https://github.com/unknownloner/calccomp
Right now it supports adding and subtracting, assigning variables, calling functions, and asm blocks. Strings aren't supported yet, neither are pointers.
and here's a screenshot of running an executable
If you wanna try it out, go here. Paste on left, click compile, output shows up on the right.
http://z80.unknownloner.com/calccompjs/
If it barfs on you, you probably have a syntax error or did something unsupported.
you can use this file to test it
https://raw.githubusercontent.com/unknownloner/calccomp/master/test.c
I'm working on a C compiler to compile C code to assembly for the ti83+ series and ti84+CSE series in haskell. I don't know much about making compilers, and I don't know much about haskell either, so I'm using this as a way to learn about both. Don't expect optimized code for awhile, the first step is getting it working

If you want to check it out, code is here. The repo contains an example input file 'test.c'
https://github.com/unknownloner/calccomp
Right now it supports adding and subtracting, assigning variables, calling functions, and asm blocks. Strings aren't supported yet, neither are pointers.
and here's a screenshot of running an executable

If you wanna try it out, go here. Paste on left, click compile, output shows up on the right.
http://z80.unknownloner.com/calccompjs/
If it barfs on you, you probably have a syntax error or did something unsupported.
you can use this file to test it
https://raw.githubusercontent.com/unknownloner/calccomp/master/test.c