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
+162
-134
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.
+140
-94
File diff suppressed because it is too large.
Load diff
+22
-40
@@ -25,48 +25,30 @@ implementation
|
|||||||
|
|
||||||
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: DWORD); stdcall; [public, alias: 'kmain'];
|
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: DWORD); stdcall; [public, alias: 'kmain'];
|
||||||
begin
|
begin
|
||||||
kclearscreen();
|
console_init();
|
||||||
ktest();
|
console_writestringln('Asuro Booting...', #7);
|
||||||
kwritestr('FUCK YOU!');
|
if (mbmagic <> MULTIBOOT_BOOTLOADER_MAGIC) then begin
|
||||||
kwritestr('Freepascal barebone OS booted!');
|
console_writestringln('Multiboot Compliant Boot-Loader Needed!', #7);
|
||||||
xpos := 0;
|
console_writestringln('HALTING', #7);
|
||||||
ypos += 1;
|
|
||||||
|
|
||||||
if (mbmagic <> MULTIBOOT_BOOTLOADER_MAGIC) then
|
|
||||||
begin
|
|
||||||
kwritestr('Halting system, a multiboot-compliant boot loader needed!');
|
|
||||||
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;
|
|
||||||
|
|
||||||
asm
|
asm
|
||||||
@loop:
|
cli
|
||||||
jmp @loop
|
hlt
|
||||||
end;
|
end;
|
||||||
|
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
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
Reference in new issue
Block a user