Skip to content
Luc Yriarte edited this page Dec 29, 2022 · 18 revisions

Welcome to the Cm7b5 wiki!

Compiler architecture

Tutorial examples

git checkout tokenizer
git checkout rpn
git checkout recursive
git checkout interpreter
git checkout c_subset_compiler

Sample programs

Code blocs

git checkout code_bloc_compiler

C language subset

git checkout c_subset_compiler

Helper scripts

cm7b5 compiler script

target=$(basename $1 .c) 
cat $1 | ./compiler > $target.asm 
asm7b5 $target.asm 

asm7b5 assembler script

target=$(basename $1 .asm) 
yasm -f elf $target.asm 
ld -s -o $target.bin $target.o