Minor changes
This commit is contained in:
parent
22e5f89bb1
commit
e8e03d7ed1
|
@ -16,6 +16,7 @@
|
|||
|
||||
[bits 16]
|
||||
switch_to_protected_mode:
|
||||
cli ; Now we disable interrupts
|
||||
; We enable the A20 line using
|
||||
; the ol' but (mostly) reliable
|
||||
; keyboard controller method
|
||||
|
@ -23,7 +24,6 @@ switch_to_protected_mode:
|
|||
out 0x64, al
|
||||
mov al, 0xdf
|
||||
out 0x60, al
|
||||
cli ; Now we disable interrupts
|
||||
lgdt [gdt_descriptor] ; Time to load the GDT descriptor
|
||||
; We set 32-bit mode in CR0. Almost done!
|
||||
mov eax, cr0
|
||||
|
|
|
@ -19,23 +19,14 @@ limitations under the License.
|
|||
#include "kernel/util.h"
|
||||
|
||||
|
||||
void kmain(void) {
|
||||
i32 kmain(void) {
|
||||
/*
|
||||
The kernel entry point of TSOS
|
||||
*/
|
||||
|
||||
// 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!");
|
||||
kprint("\nTSOS kernel started!");
|
||||
// TODO...
|
||||
return 0x022172; // :D
|
||||
}
|
Loading…
Reference in New Issue