summaryrefslogtreecommitdiff
path: root/Source/Kernel/Core
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-09-16 15:41:10 +0200
committerAlexis211 <alexis211@gmail.com>2009-09-16 15:41:10 +0200
commit5f88058644587aa255d453eee74c212e53cf9ade (patch)
tree664cadc06d75dde2618f2b3cde933f95ba898485 /Source/Kernel/Core
parente2e0f21d932224434cb6121165dc00f0c1bb3bdd (diff)
downloadMelon-5f88058644587aa255d453eee74c212e53cf9ade.tar.gz
Melon-5f88058644587aa255d453eee74c212e53cf9ade.zip
Added stuff to WChar and String classes.
WChar can now decode utf16 and utf32, and encode utf8 and utf32. String now has functions append(), concat(), compare() and affect() with different prototypes for char[] arrays, so that we can use it as well with utf8, utf16 and utf32.
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r--Source/Kernel/Core/kmain.wtf.cpp3
-rw-r--r--Source/Kernel/Core/loader.wtf.asm6
2 files changed, 6 insertions, 3 deletions
diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp
index 89932e3..b8ebe49 100644
--- a/Source/Kernel/Core/kmain.wtf.cpp
+++ b/Source/Kernel/Core/kmain.wtf.cpp
@@ -130,6 +130,7 @@ void kmain(multiboot_info_t* mbd, u32int magic) {
*kvt << " - Command list for integrated kernel shell:\n";
*kvt << " - help shows this help screen\n";
*kvt << " - reboot reboots your computer\n";
+ *kvt << " - panic causes a kernel panic\n";
*kvt << " - devices shows all detected devices on your computer\n";
*kvt << " - free shows memory usage (physical frames and kernel heap)\n";
*kvt << " - uptime shows seconds since boot\n";
@@ -137,6 +138,8 @@ void kmain(multiboot_info_t* mbd, u32int magic) {
*kvt << " - Commands you should know how to use : ls, cd, cat, pwd, rm, mkdir, wf\n";
} else if (tokens[0] == "reboot") {
Sys::reboot();
+ } else if (tokens[0] == "panic") {
+ PANIC("This is what happens when you say 'panic'.");
} else if (tokens[0] == "ls") {
DirectoryNode* d = cwd;
if (tokens.size() == 2) {
diff --git a/Source/Kernel/Core/loader.wtf.asm b/Source/Kernel/Core/loader.wtf.asm
index 8d7b076..5a925d5 100644
--- a/Source/Kernel/Core/loader.wtf.asm
+++ b/Source/Kernel/Core/loader.wtf.asm
@@ -51,7 +51,7 @@ static_ctors_loop: ; construct global objects
call kmain ; call kernel proper
- cli ; disable interuptions
+ cli ; disable interupts
static_dtors_loop: ; useless, kernel should never return
mov ebx, start_dtors ; destruct global objects
@@ -69,11 +69,11 @@ hang:
[section .setup] ; this is included in the .setup section, so that it thinks it is at 0x00100000
-trickgdt: ; our false GDT
+trickgdt: ; our false GDT (this is equivalent to the gdt_ptr_t structure defined in GDT.ns.h)
dw gdt_end - gdt - 1 ; gdt limit
dd gdt ; gdt base
-gdt:
+gdt: ; each of these is equivalent to one gdt_entry_t structure, defined in GDT.ns.h
dd 0, 0 ; null GDT entry
db 0xFF, 0xFF, 0, 0, 0, 10011010b, 11001111b, 0x40 ; kernel code segment
db 0xFF, 0xFF, 0, 0, 0, 10010010b, 11001111b, 0x40 ; kernel data segment