<commit_before>#include <metodo/hal/vga.h>

#define COLS (80)
#define ROWS (25)
#define VIDEO_MEMORY (0xb8000)

#define CLEAR (attr << 8 | ' ')
#define SPOT(n) (attr << 8 | (n))
#define PUTSPOT(n) VideoMemory[row*COLS + col] = SPOT(n);

static uint16_t *VideoMemory;

static uint8_t disp_init = 0;
static uint8_t attr;
static uint8_t col;
static uint8_t row;
static uint8_t escape;
static uint8_t escape_attr;

void VgaDisplaySetAttr(uint8_t lattr)
{
	attr = lattr;
}

void VgaDisplayClear(void)
{
	int i;
	VgaDisplayCursorPosition(0, 0);
	for (i = 0; i < COLS*ROWS; i++)
		VideoMemory[i] = CLEAR;
}

static void VgaDisplayScroll(void)
{
	int i;
	if (row >= ROWS) {
		for (i = 0; i < COLS*(ROWS-1); i++) {
			VideoMemory[i] = VideoMemory[i + COLS];
		}
		for (COLS*(ROWS-1); i < COLS*ROWS; i++) {
			VideoMemory[i] = CLEAR;
		}
		row = ROWS-1;
		col = 0;
	}
}

void VgaDisplayChar(char c)
{
	if (c == 0x08) {
		/* Backspace */
		col--;
		PUTSPOT(' ');<commit_msg>Un-needed tweak to metodo/hal/i386/vga.c soley to get rid of a warning<commit_after>#include <metodo/hal/vga.h>

#define COLS (80)
#define ROWS (25)
#define VIDEO_MEMORY (0xb8000)

#define CLEAR (attr << 8 | ' ')
#define SPOT(n) (attr << 8 | (n))
#define PUTSPOT(n) VideoMemory[row*COLS + col] = SPOT(n);

static uint16_t *VideoMemory;

static uint8_t disp_init = 0;
static uint8_t attr;
static uint8_t col;
static uint8_t row;
static uint8_t escape;
static uint8_t escape_attr;

void VgaDisplaySetAttr(uint8_t lattr)
{
	attr = lattr;
}

void VgaDisplayClear(void)
{
	int i;
	VgaDisplayCursorPosition(0, 0);
	for (i = 0; i < COLS*ROWS; i++)
		VideoMemory[i] = CLEAR;
}

static void VgaDisplayScroll(void)
{
	int i;
	if (row >= ROWS) {
		for (i = 0; i < COLS*(ROWS-1); i++) {
			VideoMemory[i] = VideoMemory[i + COLS];
		}
		for (i = COLS*(ROWS-1); i < COLS*ROWS; i++) {
			VideoMemory[i] = CLEAR;
		}
		row = ROWS-1;
		col = 0;
	}
}

void VgaDisplayChar(char c)
{
	if (c == 0x08) {
		/* Backspace */
		col--;
		PUTSPOT(' ');
{'fraction_non_alphanumeric': 0.16305988928032208, 'fraction_numerical': 0.033719174635128336, 'mean_word_length': 3.896551724137931, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4979535', 'n_tokens_mistral': 949, 'n_tokens_neox': 878, 'n_words': 217}