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