2017-11-08 02:36:35 +00:00
|
|
|
import tty, gdt, irq, serial
|
2017-10-21 19:23:17 +01:00
|
|
|
|
|
|
|
proc kernelMain() {.exportc: "kernel_main"}=
|
2017-11-08 02:36:35 +00:00
|
|
|
serial.init()
|
|
|
|
serial.write("Booting OS")
|
2017-11-06 21:44:17 +00:00
|
|
|
gdt.gdtInstall()
|
2017-11-08 02:36:35 +00:00
|
|
|
serial.write("GDT installed")
|
2017-10-21 19:23:17 +01:00
|
|
|
terminalInitialize()
|
2017-10-22 00:44:01 +01:00
|
|
|
terminalWrite("Hello World!\L")
|
|
|
|
terminalWrite("MAX_INT:")
|
|
|
|
terminalWrite(high(int))
|
|
|
|
terminalWrite("\LMIN_INT:")
|
|
|
|
terminalWrite(low(int32)+1)
|
2017-10-22 01:54:51 +01:00
|
|
|
for i in 0..22:
|
|
|
|
terminalWrite(i)
|
|
|
|
terminalWrite('\L')
|