Some errors in tutorials
Posted: Sat Apr 26, 2008 8:13 pm
Hi! I've found some bugs in your tutorials.
org 0x10000 ; Kernel starts at 1 MB
(0x10000 = 64KiB)
mov bx, 0x1000 ; BX:BP points to buffer to load to
mov bp, 0x0000 ; load to 1 MB (0x10000)
(0x1000:0 = 64KiB)
jmp 0x8:0x10000 ; jump to our kernel! Note: This assumes Kernel's entry point is at 1 MB
(0x10000 = 1MiB)
Also, kernel can't be bigger than 64KiB or it won't load, because max. addressable mem in real mode with a20 gate active is 1MiB + 64KiB (0xFFFF*16+0xFFFF = 0x10FFEF - 1114095 bytes)
A "times 65537-($-$$) db 0" at end of kernel asm file crashes it.
Any way of loading bigger kernels? Unreal mode maybe?
Loading it to low mem, switching to pmode, copy to high mem, going, to rmode, repeat ?
Thanks,
Gonzalo
org 0x10000 ; Kernel starts at 1 MB
(0x10000 = 64KiB)
mov bx, 0x1000 ; BX:BP points to buffer to load to
mov bp, 0x0000 ; load to 1 MB (0x10000)
(0x1000:0 = 64KiB)
jmp 0x8:0x10000 ; jump to our kernel! Note: This assumes Kernel's entry point is at 1 MB
(0x10000 = 1MiB)
Also, kernel can't be bigger than 64KiB or it won't load, because max. addressable mem in real mode with a20 gate active is 1MiB + 64KiB (0xFFFF*16+0xFFFF = 0x10FFEF - 1114095 bytes)
A "times 65537-($-$$) db 0" at end of kernel asm file crashes it.
Any way of loading bigger kernels? Unreal mode maybe?
Loading it to low mem, switching to pmode, copy to high mem, going, to rmode, repeat ?
Thanks,
Gonzalo