This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
OS_Project/Part2/A4/04_scroll/kernel/kernel.c

22 lines
535 B
C
Raw Permalink Normal View History

2023-09-11 18:28:11 +00:00
#include "../drivers/screen.h"
#include "util.h"
void _start() {
clear_screen();
/* Fill up the screen */
int i = 0;
2023-09-14 21:57:36 +00:00
for (i = 0; i < 30; i++) {
2023-09-11 18:28:11 +00:00
char str[255];
int_to_ascii(i, str);
kprint_at(str, 0, i);
2023-09-15 13:50:00 +00:00
/* Inserted Code */
2023-09-14 21:57:36 +00:00
for( int j = 0; j < 100000000; ++j) {
;
}
2023-09-11 18:28:11 +00:00
}
kprint_at("This text forces the kernel to scroll. Row 0 will disappear. ", 60, 24);
kprint("And with this text, the kernel will scroll again, and row 1 will disappear too!");
}