Added Windows support
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-07-01 13:37:40 +02:00
parent dbc865ee67
commit 562c839835
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
37 changed files with 742 additions and 45 deletions

View file

@ -1,28 +1,23 @@
init() {
// kernel32.SetConsoleCP(cp.utf8)
// kernel32.SetConsoleOutputCP(cp.utf8)
utf8 := 65001
kernel32.SetConsoleCP(utf8)
kernel32.SetConsoleOutputCP(utf8)
main.main()
exit()
}
exit() {
// kernel32.ExitProcess(0)
kernel32.ExitProcess(0)
}
crash() {
// kernel32.ExitProcess(1)
kernel32.ExitProcess(1)
}
// const {
// cp {
// utf8 65001
// }
// }
// extern {
// kernel32 {
// SetConsoleCP(cp uint)
// SetConsoleOutputCP(cp uint)
// ExitProcess(code uint)
// }
// }
extern {
kernel32 {
SetConsoleCP(cp uint)
SetConsoleOutputCP(cp uint)
ExitProcess(code uint)
}
}

View file

@ -1,3 +1,10 @@
write(_ []byte) -> (written int) {
return 0
}
extern {
kernel32 {
GetStdHandle(handle int64) -> int64
WriteConsoleA(fd int64, buffer *byte, length uint32, written *uint32) -> bool
}
}