import vga const vgaWidth = 80 vgaHeight = 25 terminalBufferBaseAddress = 0xB8000 bufferWidthSkip = vgaWidth * 2 var terminalRow, terminalColumn = 0 terminalColour: int proc terminalWriteAtPoint(writeChar: char, colour: int, xPos: int, yPos: int) = let index = terminalBufferBaseAddress + (yPos * bufferWidthSkip + (xPos * 2)) cast[ptr int16](index)[] = vga.vgaEntry(writeChar, terminalColour) proc terminalClear*() = for x in 0.. 0: i = i - 1 terminalWrite(parsedData[i])