Project Overview

What is this project?
This project is an attempt to produce a working 6502 assembly compiler for the LOLCODE language written in Java.

What is LOLCODE?
LOLCODE is fairly new language, created solely by the online community. It derives its syntax from contemporary Internet slang, but has a very imperative/procedural grammar.

Why use LOLCODE?
Since LOLCODE code is fairly esoteric, it appears to be a very fun language to program in and work with. Most of the satisfaction comes from writing a fairly complex program that appears to be the ramblings of Anonymous.

What is the 6502?
It is an 8-bit microprocessor originally created in the 80s and remains in use today (mostly in embedded and microsystems). The 6502 was used in many contemporary electronics, notably the NES.

Why use the 6502?
6502 assembly is not too complex and not too large (56 instructions in ~8 addressing modes). The lack of many hardware registers and the heavy use of memory access, adds a difficulty in creating compiler optimizations.

What are your milestones?

  1. Completion of a working grammar for LOLCODE specification 1.2 [1 week]
  2. Implement a working scanner + parser for above grammar [1 week]
  3. Type-checking and semantic checking on IR-code [2 weeks]
  4. Instruction selection based on basic ruleset + code generation [1 week]
  5. Compiler optimizations: register allocation, control flow, etc [2 weeks]
  6. Advanced instruction selection using addressing modes [2 weeks]
  7. Final code generation step [1 week]
  8. Examples and sample programs [1 week]

What tools will you be using?
Several tools will be used for this project, (mostly based in Java):

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License