Hallo
hat sich schon mal jemand mit GRUB und VBE beschäftigt?
Ich bekomme es einfach nicht hin, GRUB sagt mit "Error 13: Invalid or unsupported executable format". Ohne Grafik-Initialiserung funktioniert es.
Hier der Code
;---------------------------------------------------------------------------
; Assembler-Anweisungen
;---------------------------------------------------------------------------
[BITS 32]
align 4
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Definition der externen und globalen Funktionen
;---------------------------------------------------------------------------
EXTERN _main
GLOBAL start
MULTIBOOT_PAGE_ALIGN equ 1<<0
MULTIBOOT_MEMORY_INFO equ 1<<1
MULTIBOOT_GRAPHIC equ 1<<2
MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Konfiguration
;---------------------------------------------------------------------------
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_GRAPHIC
MULTIBOOT_GRAPHIC_MODE equ 0x00 ; linearer Grafikmodus
MULTIBOOT_GRAPHIC_WIDTH equ 800 ; Breite
MULTIBOOT_GRAPHIC_HIGH equ 600 ; Höhe
MULTIBOOT_GRAPHIC_DEPTH equ 8 ; Farbtiefe
CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Einsprungs-Punkt aufrufen
;---------------------------------------------------------------------------
jmp start
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; GRUB Multiboot Header
;---------------------------------------------------------------------------
dd MULTIBOOT_HEADER_MAGIC
dd MULTIBOOT_HEADER_FLAGS
dd CHECKSUM
dd 0x00 ; header_addr
dd 0x00 ; load_addr
dd 0x00 ; load_end_addr
dd 0x00 ; bss_end_addr
dd 0x00 ; entry_addr
dd MULTIBOOT_GRAPHIC_MODE
dd MULTIBOOT_GRAPHIC_WIDTH
dd MULTIBOOT_GRAPHIC_HIGH
dd MULTIBOOT_GRAPHIC_DEPTH
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Funktion start
;---------------------------------------------------------------------------
start:
mov esp, 0xA00000
push 0
popf
push eax
push ebx
;---------------------------------------------------------------------------
; Springe in den C++ Teil des Kernels
;---------------------------------------------------------------------------
call _main
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------