Skip to content

Commit

Permalink
Changed 'put_char' to default attribute to 'white on black'
Browse files Browse the repository at this point in the history
  • Loading branch information
shafzhr committed Feb 24, 2021
1 parent 584e2ce commit 566e0ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cpu/isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ void isr_handler(registers_t regs)
kprint("Recieved interrupt #");

kprint(itoa(int_num, int_number_str, 10));
put_char('\n', VGA_COLOR_WHITE_BLACK);
put_char('\n');

kprint(exception_messages[int_num]);
put_char('\n', VGA_COLOR_WHITE_BLACK);
put_char('\n');
while (1)
{
asm("hlt");
Expand Down
6 changes: 3 additions & 3 deletions drivers/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ void kprint(const char* msg)
kprint_pos(msg, -1, -1, VGA_COLOR_WHITE_BLACK);
}

void put_char(const char ch, uint8_t attribute)
void put_char(const char ch)
{
put_char_pos(ch, -1, -1, attribute);
put_char_pos(ch, -1, -1, VGA_COLOR_WHITE_BLACK);
}

void clear_screen(void)
Expand Down Expand Up @@ -77,7 +77,7 @@ void kprint_pos(const char* msg, int x, int y, uint8_t attribute)

for (; *msg != 0; ++msg)
{
put_char(*msg, attribute);
put_char_pos(*msg, -1, -1, attribute);
}

}
Expand Down
2 changes: 1 addition & 1 deletion drivers/screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

void init_screen(void);
void clear_screen(void);
void put_char(const char, uint8_t);
void put_char(const char);
void kprint_pos(const char*, int, int, uint8_t);
void kprint(const char*);
void kprint_backspace(void);
Expand Down

0 comments on commit 566e0ec

Please sign in to comment.