From eee9b56f86462bd1ec24974b891be1f2e4d188f7 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Sat, 21 Oct 2017 16:31:41 +0100 Subject: [PATCH] Prevented zeroing of memory beyond the 8bit input. --- kernel.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel.nim b/kernel.nim index 41aa066..cab13f5 100644 --- a/kernel.nim +++ b/kernel.nim @@ -34,11 +34,11 @@ var proc terminalWriteAtPoint(writeChar: char, colour: int, xPos: int, yPos: int) = let index = terminalBufferBaseAddress + (yPos * vgaWidth + (xPos * 2)) - cast[ptr int](index)[] = int(writeChar) # Write directly to display memory - cast[ptr int](index+1)[] = terminalColour + cast[ptr int8](index)[] = int8(writeChar) # Write directly to display memory + cast[ptr int8](index+1)[] = int8(terminalColour) proc terminalInitialize() = - terminalColour = vgaEntryColour(VGA_Colour.white, VGA_Colour.black) + terminalColour = vgaEntryColour(VGA_Colour.lightGreen, VGA_Colour.red) for y in 0..