summaryrefslogtreecommitdiff
path: root/src/kernel/vga.c
blob: d0170c0755893bd6c957f67168917238310d8c0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdint.h>

#define VGA_START (uint16_t *)0x000b8000
#define VGA_END (VGA_START + 80 * 25)
uint16_t *cursor = VGA_START;
uint16_t color = 0x1f00;

void vga_printsz(uint8_t *sz) {
  while (*sz) {
    *(cursor++) = color | *(sz++);
    if (cursor == VGA_END)
      cursor = VGA_START;
  }
}