Implemented console output for Windows

This commit is contained in:
Eduard Urbach 2025-02-09 16:24:36 +01:00
parent abd19903ec
commit ba4f07893c
Signed by: eduard
GPG key ID: 49226B848C78F6C8

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
}