VGA mode: the computer reboots.
Posted: Wed Jun 22, 2011 3:42 pm
Hi all.
I have a problem: when I try to switch to vga mode, in bootstrap process, the computer being rebooted. I don't know why this happends. This is my code:
Can anyone help me?
Thanks,
--mghis
I have a problem: when I try to switch to vga mode, in bootstrap process, the computer being rebooted. I don't know why this happends. This is my code:
Code: Select all
[BITS 32]
global start
start:
mov esp, _sys_stack
jmp stublet
ALIGN 4
mboot:
MULTIBOOT_PAGE_ALIGN equ 1<<0
MULTIBOOT_MEMORY_INFO equ 1<<1
MULTIBOOT_AOUT_KLUDGE equ 1<<16
MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_AOUT_KLUDGE
MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
EXTERN code, bss, end
dd MULTIBOOT_HEADER_MAGIC
dd MULTIBOOT_HEADER_FLAGS
dd MULTIBOOT_CHECKSUM
dd mboot
dd code
dd bss
dd end
dd start
stublet:
; This should get the VGA mode...
mov ah, 0x00
mov al, 0x13
int 10h
jmp $
SECTION .bss
resb 8192
Thanks,
--mghis