- Created a vscode extension and put it on the marketplace! It's called Kathleen Syntax Highlighting.
- Implemented loops
- Loops are named because that was the easiest way to implement this
- Implemented incrementing integers
- Now works as CLI tool
- Accepts parameters
- arg1: input file
- arg2: output file
- arg3: extra
noasm
: dont assemble using NASMnolink
: dont link using GCCkeep
: keep all intermediate files
- Accepts parameters
- Updated
nar_generator.rs
to allow recursively unpacking the IR. - Formatted from 4 space tabs to 2 space tabs
- Removed sex from the compiler
- Added sex to the compiler
- Added "stdlib.asm", contains function for int -> str and the info in the .data section previously in "external.asm"
- Printing 64 bit unsigned integers now works
- Fixed issue with too many newlines or weird characters after every print. print behaves as expected now.
- Embedded all files into the compiled binary. The program can now access
asm/nasm-x64-linux/*
even when run outside of the project directory. - Added two errors in
error.rs
and used them inmain.rs
for handling:- Missing command line argument: file path
- Provided file does not exist
- Constant strings, printing of constant strings and printline finally work.
-
Started working on strings in the tokenizer, however current implementation sucks.
-
Currently working on re-doing the variable types.
- Constant integer
- Dynamic integer
- Constant string
- Dynamic string
-
The plan is:
- Have constant string printable
- Have dynamic string printable
- Have ints printable
- Made the errors nicer with the colored crate.
- First compilation! All the first program did was put an integer on the heap.
- Made the error messages cleaner by adding an extra space where needed to align everything
- Before:
9 | code 10 | code 11 | code
- Now:
9 | code 10 | code 11 | code
- Before:
- Created the assembly code blocks and a function in asm_generator.asm that replaces the "<>" in the asm blocks with the proper values.
- Finally got the bss idea working.
- Here's how variables are made:
- allocate area in .bss for pointer
- call malloc, put the recieved pointer into the memory area pointed to by the .bss pointer.
- To access the data, double dereference the BSS pointer.
- Here's how variables are made:
- Turns out the way I wanted to do things is not possible (store pointer to var in section .data, which is immutable, silly me!)
- Instead I'm working on a different approach, where we have a list of pointers in the bss section.
- Today, the 25th, I was finally able to write assembly code that puts a value on the heap.
- Started work on NAR.
- Finished Let and Print in both IR and NAR
- Finished Let binding in IR
- only supports int.
- Put the IR generating function in another function to make functions, loops and all that pizazz easier later
idk