TSOS/src/kernel/main.c

41 lines
1.2 KiB
C
Raw Normal View History

2022-11-17 22:37:30 +01:00
/*
Copyright 2022 Mattia Giambirtone & Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "kernel/types.h"
#include "kernel/drivers/vga/screen.h"
#include "kernel/util.h"
2022-11-16 15:37:01 +01:00
void kmain(void) {
/*
The kernel entry point of TSOS
*/
2022-11-17 12:42:45 +01:00
// Newline so we skip the log
// messages from the bootloader
kprint("\nTSOS Kernel is starting up");
// TODO: Sleep
clearScreen();
char str[255];
/* Fill up the screen */
for (i32 i = 0; i < 24; i++) {
itoa(i, str);
kprintAt(str, 0, i);
}
kprintAt("This text forces the kernel to scroll. Row 0 will disappear.", 60, 24);
kprint("\nAnd with this text, the kernel will scroll again, and row 1 will disappear too!");
2022-11-16 15:37:01 +01:00
}