The compiler can currently do basic comparisons, if/while/for statements, integer variables, and return to the linux kernel. It can take into account operator precedence when evaluating an expression. It currently generates into x86 assembly (intel syntax) and uses my custom x86 assembler (https://github.com/KdotDevelopment/assembler). Functions do not have arguments and the type doesn't do much yet. Types have been implemented, which means a variable will only take as much memory as you let it. These are also memory aligned. The compiler supports inline assembly using a special syntax, for example: $mov rax, 60; bascically, everything between the $ and ; is pasted right into the assembly file. This allows for a quick way to make the program do something like printing without the compiler supporting it yet. You can take a look at ./test.rc for a demonstration of whatever I am working on.
-
Notifications
You must be signed in to change notification settings - Fork 0
KdotDevelopment/c-compiler
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published