54

GitHub - vasyop/miniC-hosting: A simple stack-based virtual machine that runs C...

 5 years ago
source link: https://github.com/vasyop/miniC-hosting
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

What is it?

  1. A simple stack-based virtual machine that runs C (missing features below) in the browser.

  2. The beginning of an interactive tutorial that covers C, how the VM works, and how the language is compiled.

Why?

This project is made as an experiment to see if C can be learned easier if the lower level is covered in paralel.

Can I see it?

Demo: https://vasyop.github.io/miniC-hosting

Tutorial (for people with 0 programming experience) :

Consider supporting

Missing language features

  • static arrays and structs (dynamic arrays and pointer to structs work fine).

  • Arrays of structs (arrays of pointers to structs works fine).

  • for, switch statements

  • preprocessor directives

  • bit operators

  • only bool,int,char as primitive types and they all have the same size in memory

  • ++,--,ternary

  • union,enum

  • global variables

  • macros

  • delete / delete[]

  • function overloading


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK