Console Refactoring.
git-svn-id: https://spexeah.com:8443/svn/Asuro@6 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
ca2e904cf6
commit
815d1b8199
11 files changed
+154
-126
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+139
-93
File diff suppressed because it is too large.
Load diff
+15
-33
@@ -25,44 +25,26 @@ implementation
|
||||
|
||||
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: DWORD); stdcall; [public, alias: 'kmain'];
|
||||
begin
|
||||
kclearscreen();
|
||||
ktest();
|
||||
kwritestr('FUCK YOU!');
|
||||
kwritestr('Freepascal barebone OS booted!');
|
||||
xpos := 0;
|
||||
ypos += 1;
|
||||
|
||||
if (mbmagic <> MULTIBOOT_BOOTLOADER_MAGIC) then
|
||||
begin
|
||||
kwritestr('Halting system, a multiboot-compliant boot loader needed!');
|
||||
console_init();
|
||||
console_writestringln('Asuro Booting...', #7);
|
||||
if (mbmagic <> MULTIBOOT_BOOTLOADER_MAGIC) then begin
|
||||
console_writestringln('Multiboot Compliant Boot-Loader Needed!', #7);
|
||||
console_writestringln('HALTING', #7);
|
||||
asm
|
||||
cli
|
||||
hlt
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
kwritestr('Booted by a multiboot-compliant boot loader!');
|
||||
xpos := 0;
|
||||
ypos += 2;
|
||||
kwritestr('Multiboot information:');
|
||||
xpos := 0;
|
||||
ypos += 2;
|
||||
kwritestr(' Lower memory = ');
|
||||
kwriteint(mbinfo^.mem_lower);
|
||||
kwritestr('KB');
|
||||
xpos := 0;
|
||||
ypos += 1;
|
||||
kwritestr(' Higher memory = ');
|
||||
kwriteint(mbinfo^.mem_upper);
|
||||
kwritestr('KB');
|
||||
xpos := 0;
|
||||
ypos += 1;
|
||||
kwritestr(' Total memory = ');
|
||||
kwriteint(((mbinfo^.mem_upper + 1000) div 1024) +1);
|
||||
kwritestr('MB');
|
||||
end;
|
||||
|
||||
console_writestringln('Asuro Booted Correctly!', #7);
|
||||
console_writestring('Lower Memory = ', #7);
|
||||
console_writeint(mbinfo^.mem_lower, #7);
|
||||
console_writestringln('KB', #7);
|
||||
console_writestring('Higher Memory = ', #7);
|
||||
console_writeint(mbinfo^.mem_upper, #7);
|
||||
console_writestringln('KB', #7);
|
||||
console_writestring('Total Memory = ', #7);
|
||||
console_writeint(((mbinfo^.mem_upper + 1000) div 1024) +1, #7);
|
||||
console_writestringln('MB', #7);
|
||||
asm
|
||||
@loop:
|
||||
jmp @loop
|
||||
|
||||
Reference in new issue
Block a user