From ac53cb9cfcbd001ef668196beb0d82cd7e174cc0 Mon Sep 17 00:00:00 2001 From: Thomas Oltmann Date: Wed, 16 Jul 2025 22:51:07 +0200 Subject: [PATCH] Saving framebuffer information --- lboot.S | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/lboot.S b/lboot.S index 002f172..c5977e2 100644 --- a/lboot.S +++ b/lboot.S @@ -504,6 +504,7 @@ dump: push %eax ret vbe_setup: + push %eax push %ecx push %esi push %bp @@ -521,6 +522,15 @@ _vbenext: mov %fs:(%si), %cx je _vbedone call vbe_getmode + //mov , bb_fb_size + mov tx_buf+16, %ax + mov %ax, bb_fb_scanl + mov tx_buf+18, %ax + mov %ax, bb_fb_width + mov tx_buf+20, %ax + mov %ax, bb_fb_height + mov tx_buf+40, %eax + mov %eax, bb_fb_ptr testw $0x80, tx_buf jz _vbenext @@ -536,6 +546,7 @@ _vbedone: leave pop %esi pop %ecx + pop %eax ret vbe_getinfo: @@ -794,11 +805,6 @@ type_table: .byte 0 .byte 2 .byte 0 - // ToDo List: - // - Sorting the memmap - // - Sanitizing the memmap - // - Parsing a config file - hex_digits: .ascii "0123456789ABCDEF" .section .data.bootboot @@ -811,7 +817,11 @@ bb_size: .long 128 .space 10, 0 bb_ird_ptr: .quad 0 bb_ird_size:.quad 0 - .space 24, 0 +bb_fb_ptr: .quad 0 +bb_fb_size: .long 0 +bb_fb_width:.long 0 +bb_fb_height:.long 0 +bb_fb_scanl:.long 0 .space 64, 0 bb_memmap: .space 4096-128, 0