Inspiration

We wanted to put the full in full-stack. From machine-learning to assembly language.

What it does

Solves the XOR Problem in C without floating point or dynamic memory allocation. This is compiled into LC3, a bare-bones assembly language, and run on the simulator we wrote for LC3.

How we built it

The LC3 simulator is written in Python by reading on the language description here.

The XOR problem is solved in a subset of C supported by LC3 (no floating point, or dynamic memory).

Challenges we ran into

LLVM

Initially, we planned to write an LLVM backend to compile our C to LC3. We failed spectacularly due to a combination of cockiness, our n00b status compared to the wizards that wrote LLVM, poor documentation and snarkiness in the llvm-dev mailing list. We decided to instead use a pre-made C to LC3 compiler from McGraw Hill.

LCC

It turns out that the LC3 compiler from McGraw Hill is pretty janky too---apparently variables sometimes can't be declared within a function for no good reason.

Accomplishments that we're proud of

Erik slayed the XOR problem and the simulator. We almost got the LLVM backend to compile (98% before a nuclear meltdown from CMake.)

What we learned

Ccache is a savior for long compilations. LLVM is actually built by wizards with TableGen generating tons of the c++ via the dark arts and directed acyclic graphs.

What's next for pimp my stack

We plan to get the LLVM backend for LC3 working before the end of the semester. We are going to ask smart people why we are LLVM weenies and how we can leave LLVM weenie hut jr's and get to the salty spitoon.

Built With

Share this project:
×

Updates