I was just wondering if you're tried loading a large file into memory with the bootloader? When I try to load anything > 28kB, my loader just sits there, with the progress bar stuck. All my "kernel" does is just print some message so I know it loaded... and it won't print the message when kernel.bin > 27-28kB or so.
Code: Select all
org 0xC00
bits 32
jmp kernel
kernel:
mov esi, message ; Tell the user that we're trying
mov bx, 0x0702 ; print using attribute 0x7, row 2
print32:
mov edi, 0xB8000 ; Text memory base
xor eax, eax
mov al, bl ; Compute the offset
mov cl, 80 * 2 ; base + 2 * 80 * y
mul cl
add edi, eax
print32_loop:
mov bl, byte [esi] ; Get next character
mov word [edi], bx ; Write the character
inc esi ; Move data pointer
inc edi ; Move memory pointer
inc edi
or bl, bl ; If it's not a zero byte
jne print32_loop ; print the next character
halt:
jmp halt
message DB "Kernel loaded!", 0x00
; produce a large binary file.
times (1024 * 28)-($-$$) db 0x00