Made screen.h actually good

This commit is contained in:
2024-03-09 19:33:28 +01:00
parent e8ea9ebcc0
commit 71e80f73bb
6 changed files with 78 additions and 9 deletions
+26 -3
View File
@@ -1,9 +1,32 @@
#ifndef SCREEN_H
#define SCREEN_H
#define VIDMEM 0xb8000
#include "stdint.h"
void putc(char c, char attr);
void print(char* s, char attr);
#define VIDMEM 0xb8000
#define CURSOR_HIGH 14
#define CURSOR_LOW 15
#define CTRLREG 0x3d4
#define DATAREG 0x3d5
// 80x25 VGA Text mode
#define ROWS 25
#define COLS 80
#define CHARS (ROWS*COLS)
#define CURSOR '_'
void putc(char c, uint8_t attr);
void print(char* s, uint8_t attr);
void putcAt(char c, uint8_t attr, uint8_t row, uint8_t col);
void printAt(char* s, uint8_t attr, uint8_t row, uint8_t col);
void clear(uint8_t attr);
void setCursorPos(uint16_t offset);
uint16_t getCursorPos();
uint16_t calcOffset(uint8_t row, uint8_t col);
void setCursorChar(char cursor);
char getCursorChar();
#endif