Open GodToRun opened 2 years ago
AFAIK You can't read more than 62 sectors because that's the hard limit of what you can do in real mode
You can read more sectors, the hard limit in a single interrupt is 127* sectors. However, qemu
believes your disk is 512 bytes long because that is how long your boot sector is (or more if you have a kernel). You can use a quick hack to counteract this:
$ touch zero.asm
$ cat "times 65536 db 0x00" > zero.asm
$ nasm -f bin zero.asm -o zero.bin
$ rm zero.asm
You can then modify your Makefile so it runs cat bootsect.bin kernel.bin zero.bin > os-image.bin
instead of just bootsect.bin
and kernel.bin
.
*Technically, it is 128, but I assume you don't want to reload your boot sector again
Hi, there is a problem with increasing the number of sectors that the kernel needs to read as it grows. If the number of sectors read (dh) is greater than 62, only Loading kernel into memory appears and the kernel is not loaded. I tried to increase the memory, but it didn't work. Here's the code.
bootsect.asm
disk.asm