Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hi people I have a kernel which works in bochs and does not work when tested under real computer. I think the problem is about my linking stuff.
Is this kind of linking correct:
kernelc.o, kernela.o, dma.o and floppy.o are aout type (just as a reminder) files. if it is not can somebody please tell me? I am not very talented about file formats and there might be a very stupid problem... Thanx...
Hi people, I solved the problem it was not about linker script or linking stuff. Anyway... But I want to say something to people who are struggling to implement and maintain their own boot sector, if you use windows and if you are using DOS copy command to copy your kernel to floppy(as I did) then it is most probable that DOS might be changing your Bios Parameter Block of boot sector in floppy. So this might cause problems, my problem was not that but I realized it and wanted to share it with you. For a reason that I did not know, DOS did not like my own BPB and changed it when I called copy kernel.bin a: from DOS box.So, I think after copying kernel file into floppy, copyboot'ing bootsector is a solution to this.
It sounds to me like you got caught by the fantastic copy problem. When microsoft implemented the copy program they set into to copy in ASCII format by default. This completly screws up binary files im still not exactly sure why although it has been explained to me before. But basically when ASCII is being copied it interperets certain things as line carriages and stuff.
Another thought is if you jus copy to a floppy with a DOS command it won't actually stick your boot sector in teh boot block it will just stick you kernel on the disk as a file and this won't boot as it hasn't actually got your boot sector in the right place. Rereading your post on what was wrong this sounds more like the problem then what i just said.
I could not really understand what you mean but I am not copying boot sector, I am 'copyboot' ing bootsector, and after that when I copy kernel file into floppy my firstly 'copyboot' ed bootsector is changed by dos. So I was trying to say if I 'copyboot' after copying kernel, then bpb is not changed. If I am not wrong you cannot copy bootsector by just dos copy command. I hope I did not misunderstand you so badly.