Enable interrupts

This commit is contained in:
Loic Guegan 2021-04-21 18:54:50 +02:00
parent 2f712d027b
commit 99019721a9
8 changed files with 132 additions and 48 deletions

View file

@ -91,13 +91,6 @@ void print(char *s){
}
}
void printc(char *str, VIDEO_COLORS c) {
VIDEO_COLORS backup = (VIDEO_COLORS)VS.fg;
VS.fg = c;
print(str);
VS.fg = backup;
}
void printi(int i) {
char str[12];
itoa(i, str);
@ -107,17 +100,8 @@ void printi(int i) {
void printh(int h) {
char str[17];
itoh(h, str);
print(str);
}
void printh(int h, u32 size) {
char str[17];
char str2[17];
itoh(h, str);
u32 a = 0;
for (u32 i = min(max(16 - size, 0), 15); i < 16; i++) {
str2[a] = str[i];
a++;
}
str2[a] = '\0';
print(str2);
u8 i=0;
while(str[i]=='0')
i++;
print(&str[i]);
}

View file

@ -8,18 +8,13 @@ extern void (*__putchar)(char);
/**
* Print a char* in the framebuffer
*/
void printk(char *,...);
extern "C" void printk(char *,...);
/**
* Print a char*
*/
void print(char *s);
/**
* Print a char in the framebuffer
*/
void printc(char *, VIDEO_COLORS c);
/**
* Print an integer using itoa()
*/
@ -30,7 +25,3 @@ void printi(int i);
*/
void printh(int h);
/**
* Print an integer as hex using itoh() truncated to size
*/
void printh(int h, u32 size);