From ba0e9982c92965df4b473422d7ab7c477e8e9d0b Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Fri, 20 Oct 2017 18:12:00 +0100 Subject: [PATCH] Added proc to write characters to terminal. --- kernel.nim | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/kernel.nim b/kernel.nim index f883f1b..0fbd2a5 100644 --- a/kernel.nim +++ b/kernel.nim @@ -32,8 +32,21 @@ var terminalRow, terminalColumn = 0 terminalColour = vgaEntryColour(VGA_Colour.lightGrey, VGA_Colour.black) +proc terminalWriteAtPoint(writeChar: char, colour: uint8, xPos: int, yPos: int) = + let index = terminalBufferBaseAddress + (yPos * vgaWidth + xPos) + cast[ptr uint16](index)[] = vgaEntry(' ', terminalColour) # Write directly to display memory + proc terminalInitialize() = for y in 0..