diff --git a/kernel.nim b/kernel.nim index bb1f548..83684c3 100644 --- a/kernel.nim +++ b/kernel.nim @@ -27,19 +27,20 @@ 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 * vgaWidth + (xPos * 2)) + let index = terminalBufferBaseAddress + (yPos * bufferWidthSkip + (xPos * 2)) cast[ptr int16](index)[] = vgaEntry(writeChar, terminalColour) # Write directly to display memory proc terminalInitialize() = terminalColour = vgaEntryColour(VGA_Colour.lightGreen, VGA_Colour.red) - for y in 0..