Octocontrabass wrote:
I can't assemble your code without the missing files. Which line is causing the assembler error?
Please compile boot.asm as boot.bin, loader.asm as loader.bin, then compile the kernel.asm to kernel.o by using ELF, and main.c to main.o either (add -m32 if your computer is x86_64). Then use ld to link like this:
ld -s -Ttext 0x30400 -o kernel.bin kernel.o main.o
Then do these commands under Linux:
dd if=/dev/zero of=a.img bs=512 count=2880
dd if=boot.bin of=a.img bs=512 count=1 conv=notrunc
sudo mount -o loop a.img /mnt/floppy/
cp -fv loader.bin /mnt/floppy/
cp -fv kernel.bin /mnt/floppy/
sudo umount /mnt/floppy/
And also, use an VM to run a.img.
There're still three headers missing (fat12hdr.inc, pm.inc, load.inc) and I also put them down there.
Because of this forum can't accept *.inc, so I changed the suffix to asm and please change that back.