added video to multiboot flags
This commit is contained in:
parent
e963f0f871
commit
a64c3d7c2f
|
@ -1,11 +1,24 @@
|
||||||
%define MAGIC 0x1BADB002
|
%define MAGIC 0x1BADB002
|
||||||
%define FLAGS 0x0
|
%define ALIGN 1<<0
|
||||||
|
%define MMAP 1<<1
|
||||||
|
%define VID 1<<2
|
||||||
|
%define FLAGS (ALIGN | MMAP | VID)
|
||||||
|
|
||||||
section .multiboot
|
section .multiboot
|
||||||
dd MAGIC
|
dd MAGIC
|
||||||
dd FLAGS
|
dd FLAGS
|
||||||
dd -(MAGIC + FLAGS)
|
dd -(MAGIC + FLAGS)
|
||||||
|
|
||||||
|
dd 0 ; header_addr
|
||||||
|
dd 0 ; load_addr
|
||||||
|
dd 0 ; load_end_addr
|
||||||
|
dd 0 ; bss_end_addr
|
||||||
|
dd 0 ; entry_addr
|
||||||
|
dd 1 ; mode_type
|
||||||
|
dd 80 ; width
|
||||||
|
dd 25 ; height
|
||||||
|
dd 0 ; depth
|
||||||
|
|
||||||
section .text
|
section .text
|
||||||
global _start
|
global _start
|
||||||
_start:
|
_start:
|
||||||
|
|
|
@ -6,6 +6,7 @@ kernel_ctx_t ctx = {0};
|
||||||
|
|
||||||
void kernel(multiboot_info_t *info) {
|
void kernel(multiboot_info_t *info) {
|
||||||
if (!(info->flags & (1<<6))) goto halt;
|
if (!(info->flags & (1<<6))) goto halt;
|
||||||
|
if (!(info->flags & (1<<12))) goto halt;
|
||||||
ctx.mem_map = (multiboot_memory_map_t *)info->memmapaddress;
|
ctx.mem_map = (multiboot_memory_map_t *)info->memmapaddress;
|
||||||
ctx.mem_map_len = info->memmaplength;
|
ctx.mem_map_len = info->memmaplength;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user