3b97d0307d
Thanks to: "clang-format -i -style=file **/*.{c,h}"
35 lines
923 B
C
35 lines
923 B
C
#pragma once
|
|
#include "stdarg.h"
|
|
#include "types.h"
|
|
|
|
// https://wiki.osdev.org/Text_UI
|
|
#define BLACK 0x00
|
|
#define BLUE 0x01
|
|
#define GREEN 0x02
|
|
#define CYAN 0x03
|
|
#define RED 0x04
|
|
#define MAGENTA 0x05
|
|
#define BROWN 0x06
|
|
#define GREY 0x07
|
|
#define WHITE 0x0F
|
|
|
|
#define VGA_ADDR 0xB8000
|
|
#define VGA_WIDTH 80
|
|
#define VGA_HEIGHT 25
|
|
|
|
#ifndef pr_fmt
|
|
#define pr_fmt(fmt) fmt
|
|
#endif
|
|
|
|
int VGASetup(uint bgColor, uint color);
|
|
void VGAputc(const char str);
|
|
void clearScreen(uint bgColor);
|
|
void clearScreenLine(uint bgColor, uint line);
|
|
void printIntDetails(int integer, uint color, uint bgColor, int startX, int startY);
|
|
void printCharDetails(char str, uint color, uint bgColor, int startX, int startY);
|
|
void printStringDetails(const char *str, uint color, uint bgColor, int startX, int startY);
|
|
void vgaScrollUp(void);
|
|
void cursorEnable(uint8_t cursor_start, uint8_t cursor_end);
|
|
void cursorDisable(void);
|
|
void cursorMove(int x, int y);
|