Compiler in C for a simple programming language that compiles to x64 assembly (NASM syntax).
- Functions
- Scopes
- Pointers
- Arrays
- Structs
- Type inference
extern puts(str: char *);
extern strlen(str: char *) -> int;
func main() -> int {
str := "Hello world!";
puts(str);
return strlen(str);
}
- NASM (https://www.nasm.us/): used as assembler and should be added to the system
Path
variable. - Microsoft Linker (included with Visual Studio) is used for linking.