1)
The size of my kernel was 21.8k ,but when i added just one function ,it increased from 21.8k to 26.1k.
The command i'm using to link asm and c files is
Code: Select all
ld -Ttext=0x1000 --oformat binary -o kernel.bin kernel_asm.o kernel_c.o
(i think it has something to do with linker script)
2)
After this i add an array of 360 bytes.then read something from floppy everything goes fine.But when i call that fuction which reads from floppy from some other function ,floppy drive motor turns on and then everything hangs.
No interrupt is recieved after that.
When i removed that array of 360 bytes.everything works OK again.
Please tell me what might be causing problem.
Is my code falling in wrong memory location.I'm loading my kernel at address 0000:1000 and size of kernel is between 26 and 27k.
Is it something to do with compiler gcc .I'm including all header and implementation files in one main file and then compiling the main file to get all the files be compiled.
IS it something to do with linker. the command i'm using to link is given in problem 1)
You may say that there might be a bug in code but then why code works fine when i remove array or reduce its size.Why code works ok in one funtion even when i keep the array of 360 bytes and doesn't work when called from some other function.