Skip to content

Commit d69b85b

Browse files
Update kernel.c
1. Removal of the toxic function flushFrmBfr();// mess with the meory
1 parent 2827ba4 commit d69b85b

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

part4/kernel/kernel.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ extern void term_write(const char *string, size_t length) {
7474
terminal_request.response->write(main_terminal, string, length);
7575
}
7676

77+
/*
7778
void flushFrmbuffer(void) {
7879
asm volatile("" ::: "memory");
79-
}
80+
}*/ //very very very toxic function
8081

81-
void clear_Txt(void) {
82+
void clear_TxT(void) {
8283
char *space_line = " "; // 80 spaces
8384
for(size_t raw = 0; raw<cols; raw++) {
8485
term_write(space_line, rows);
@@ -88,7 +89,7 @@ void clear_Txt(void) {
8889

8990
extern void term_clear(void) {
9091
fb_clear(0x000000);
91-
flushFrmbuffer(); // pllllspplg troung just sone useless txt :d
92+
// pllllspplg troung just sone useless txt :d
9293
clear_TxT();
9394

9495
}
@@ -251,18 +252,10 @@ void _start(void) {
251252

252253
enableAPIC();
253254
enableAPICTimer(10);
255+
term_clear();
254256
enableKeyboard(ioapics[0]->address);
255257
initTasking();
256-
// Fetch the first framebuffer.
257-
// Fetch the first framebuffer.
258-
259-
260-
// Note: we assume the framebuffer model is RGB with 32-bit pixels.
261-
262-
263-
// Clear the screen by filling it with black.
264258

265-
// At this point, the entire screen is black, and all text or content is removed.
266259

267260

268261
doIt();

0 commit comments

Comments
 (0)