<commit_before>#include "timer.h"
#include "screen.h"
#include "../kernel/low_level.h"
#include "../kernel/util.h"
#include <stdint.h>

#define PIT_DATA0			0x40
#define PIT_DATA1			0x41
#define PIT_DATA2			0x42
#define PIT_COMMAND			0x43

void pit_init()
{
	
}

void pit_set_counter(PIT_BCD format, PIT_MODE mode, PIT_READWRITE rw, PIT_SC select_counter)
 {	
	uint8_t control_word = format | mode | rw | select_counter;
	
	// DEBUG: print control_word
	char *buf = "    ";
	int_to_string(control_word, buf);
	print("control_word: ");
	print(buf);
	
	int divisor = 1193180 / 100;
	port_byte_out(PIT_COMMAND, control_word);
	port_byte_out(PIT_DATA0, divisor & 0xFF);
	port_byte_out(PIT_DATA0, 0x00 >> 8);
}		<commit_msg>Fixed the PIT timer issue.<commit_after>#include "timer.h"
#include "screen.h"
#include "../kernel/low_level.h"
#include "../kernel/util.h"
#include <stdint.h>

#define PIT_DATA0			0x40
#define PIT_DATA1			0x41
#define PIT_DATA2			0x42
#define PIT_COMMAND			0x43

void pit_init()
{
	
}

void pit_set_counter(PIT_BCD format, PIT_MODE mode, PIT_READWRITE rw, PIT_SC select_counter)
 {	
	uint8_t control_word = format | mode | rw | select_counter;
	
	// DEBUG: print control_word
	char *buf = "    ";
	int_to_string(control_word, buf);
	print("control_word: ");
	print(buf);
	
	int divisor = 1193180 / 100;
	port_byte_out(PIT_COMMAND, control_word);
	port_byte_out(PIT_DATA0, divisor & 0xFF);
	port_byte_out(PIT_DATA0, divisor >> 8);
}
{'fraction_non_alphanumeric': 0.12482758620689655, 'fraction_numerical': 0.043448275862068966, 'mean_word_length': 4.66796875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1724646', 'n_tokens_mistral': 651, 'n_tokens_neox': 601, 'n_words': 124}