added video to multiboot flags

This commit is contained in:
rami 2024-06-27 22:31:22 -04:00
parent e963f0f871
commit a64c3d7c2f
2 changed files with 15 additions and 1 deletions

View File

@ -1,11 +1,24 @@
%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
dd MAGIC
dd 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
global _start
_start:

View File

@ -6,6 +6,7 @@ kernel_ctx_t ctx = {0};
void kernel(multiboot_info_t *info) {
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_len = info->memmaplength;