Compare commits
No commits in common. "5badddbadad80268929d63718751aa5615da6fb0" and "5ec345e59f2a3e0539a73fbd93ada7f04dc3304d" have entirely different histories.
5badddbada
...
5ec345e59f
2 changed files with 3 additions and 11 deletions
12
src/kernel.c
12
src/kernel.c
|
@ -59,20 +59,12 @@ void kmain (unsigned int mbootmagick, multiboot_info_t* mbootinfo) {
|
||||||
serial_write_string("\n BPos:");
|
serial_write_string("\n BPos:");
|
||||||
serial_write_string(itoa(mbootinfo->framebuffer_blue_field_position, 10));
|
serial_write_string(itoa(mbootinfo->framebuffer_blue_field_position, 10));
|
||||||
|
|
||||||
serial_write_string("\nMemory: ");
|
|
||||||
serial_write_string("\n lower: ");
|
|
||||||
serial_write_string(uitoa(mbootinfo->mem_lower, 10));
|
|
||||||
serial_write_string(" k");
|
|
||||||
serial_write_string("\n upper: ");
|
|
||||||
serial_write_string(uitoa(mbootinfo->mem_upper/1024, 10));
|
|
||||||
serial_write_string(" M");
|
|
||||||
|
|
||||||
initfb(mbootinfo->framebuffer_addr, mbootinfo->framebuffer_width, mbootinfo->framebuffer_height, mbootinfo->framebuffer_bpp, mbootinfo->framebuffer_pitch, mbootinfo->framebuffer_red_field_position, mbootinfo->framebuffer_green_field_position, mbootinfo->framebuffer_blue_field_position);
|
initfb(mbootinfo->framebuffer_addr, mbootinfo->framebuffer_width, mbootinfo->framebuffer_height, mbootinfo->framebuffer_bpp, mbootinfo->framebuffer_pitch, mbootinfo->framebuffer_red_field_position, mbootinfo->framebuffer_green_field_position, mbootinfo->framebuffer_blue_field_position);
|
||||||
int x, y, i;
|
int x, y, i;
|
||||||
unsigned char c = 0;
|
unsigned char c = 0;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
for(y=0; y < mbootinfo->framebuffer_height; y++) {
|
for(y=0;y<768;y++) {
|
||||||
for(x=0; x < mbootinfo->framebuffer_width; x++) {
|
for(x=0;x<1024;x++) {
|
||||||
putpixel(x, y, c, c, c, 0xff);
|
putpixel(x, y, c, c, c, 0xff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
|
||||||
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN or MULTIBOOT_MEMORY_INFO or MULTIBOOT_VIDEO_REQUEST
|
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN or MULTIBOOT_MEMORY_INFO or MULTIBOOT_VIDEO_REQUEST
|
||||||
MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
|
MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
|
||||||
|
|
||||||
section '.multiboot' align 4
|
.multiboot: align 4
|
||||||
dd MULTIBOOT_HEADER_MAGIC
|
dd MULTIBOOT_HEADER_MAGIC
|
||||||
dd MULTIBOOT_HEADER_FLAGS
|
dd MULTIBOOT_HEADER_FLAGS
|
||||||
dd MULTIBOOT_CHECKSUM
|
dd MULTIBOOT_CHECKSUM
|
||||||
|
|
Loading…
Reference in a new issue