Implemented console output for Windows

This commit is contained in:
Eduard Urbach 2025-02-09 16:24:36 +01:00
parent 064bb3acc7
commit 01ea543995
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -4,6 +4,7 @@ read(fd Int, address Pointer, length Int) -> Int {
}
write(fd Int, address Pointer, length Int) -> Int {
kernel32.WriteFile(fd, address, length)
fd = kernel32.GetStdHandle(-10 - fd)
kernel32.WriteConsoleA(fd, address, length, 0)
return length
}