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.
|
|
|
|
*/
|
|
|
|
|
2022-11-18 01:20:51 +01:00
|
|
|
#include "kernel/types.h"
|
2022-11-16 21:12:19 +01:00
|
|
|
#include "kernel/drivers/vga/screen.h"
|
2022-11-18 01:20:51 +01:00
|
|
|
#include "kernel/util.h"
|
2022-11-16 15:37:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
void kmain(void) {
|
2022-11-18 01:20:51 +01:00
|
|
|
/*
|
|
|
|
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");
|
2022-11-18 01:20:51 +01:00
|
|
|
// 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
|
|
|
}
|