From 397c272175811a810b78534db9215222115ec6f1 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sun, 8 Aug 2021 19:23:45 +0200 Subject: [PATCH] Color buffer --- src/pm/vga/print.asm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pm/vga/print.asm b/src/pm/vga/print.asm index 3aa23e5..6d1031e 100644 --- a/src/pm/vga/print.asm +++ b/src/pm/vga/print.asm @@ -3,13 +3,15 @@ ; VGA base address: 0xb8000 ; Charpos = 0xb8000 + 2(row*80 + col) +vga_color_buf: db 0x0f ; Buffer to be changed so that we can choose colors! + vga_print: pusha mov edx, VIDEO_MEM vga_print_loop: mov al, [ebx] ; Pointer to char - mov ah, 0x8f ; Color code + mov ah, [vga_color_buf] ; Color code cmp al, ASCII_END ; Check if end of string je vga_print_return ; If end then return