How to set the screen resolution in the loader, which is on
Posted: Tue Jul 30, 2019 2:59 am
Hey.
I have a question about how to use not a fixed screen resolution in my loader, but depending on the size of the monitor.
My bootloader looks like this:
Can I do that? And how?
I have a question about how to use not a fixed screen resolution in my loader, but depending on the size of the monitor.
My bootloader looks like this:
Code: Select all
bits 32
%define MULTIBOOT_MAGIC 0x1BADB002
%define MULTIBOOT_FLAGS (1<<0 | 1<<1 | 1<<2)
section .text
align 4
multiboot_header:
dd MULTIBOOT_MAGIC
dd MULTIBOOT_FLAGS
dd -(MULTIBOOT_MAGIC + MULTIBOOT_FLAGS)
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 1280 ; width
dd 1024 ; height
dd 32 ; bbp
global start
extern main
start:
cli
mov esp, stack_space
push ebx
push eax
call main
hlt
section .bss
resb 8192
stack_space: