From 47f18157b30d898b648969f20d78d3c4c6548a9f Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Sun, 22 Oct 2017 02:00:07 +0100 Subject: [PATCH] Made VGA memory bounds setting more obvious as to why it has its value. --- kernel/arch/i386/tty.nim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/arch/i386/tty.nim b/kernel/arch/i386/tty.nim index b9e1e79..bb1ab1e 100644 --- a/kernel/arch/i386/tty.nim +++ b/kernel/arch/i386/tty.nim @@ -1,11 +1,13 @@ import vga -type - VGAMemory = ptr array[0..1999, VGADoubleByte] - const vgaWidth = 80 vgaHeight = 25 + +type + VGAMemory = ptr array[0..(vgaWidth * vgaHeight - 1), VGADoubleByte] + +const terminalBufferBaseAddress = 0xB8000 vgaMem = cast[VGAMemory](terminalBufferBaseAddress)