mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2025-12-17 20:34:36 +03:00
lesson 17, video scroll
This commit is contained in:
17
17-video-scroll/kernel/kernel.c
Normal file
17
17-video-scroll/kernel/kernel.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "../drivers/screen.h"
|
||||
#include "util.h"
|
||||
|
||||
void main() {
|
||||
clear_screen();
|
||||
|
||||
/* Fill up the screen */
|
||||
int i = 0;
|
||||
for (i = 0; i < 24; i++) {
|
||||
char str[255];
|
||||
int_to_ascii(i, str);
|
||||
kprint_at(str, 0, i);
|
||||
}
|
||||
|
||||
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!");
|
||||
}
|
||||
Reference in New Issue
Block a user