Emitting proper lines and files, coding in the language!

This commit is contained in:
Krzosa Karol
2022-06-14 14:15:21 +02:00
parent f885abe3f5
commit d63a327e3e
5 changed files with 62 additions and 49 deletions

11
main.kl
View File

@@ -1,10 +1,9 @@
#import "base.kl"
print :: (string: String)
handle := Windows.GetStdHandle(Windows.STD_OUTPUT_HANDLE)
Windows.WriteConsoleA(handle, &string[0]->*void, length_of(string)->Windows.DWORD, 0, 0)
os :: #import "os.kl"
main :: (argc: int, argv: **char): int
memory := reserve(size = 10000)
print("Hello world")
memory := os.reserve(size = 10000)
os.commit(&memory, 1000)
os.release(&memory)
os.print("Hello world")