cmp wrote:my first question is: is there any way to determine, wheter an interrupt suspended another interrupt?
eg: i got my timer interrupt switching the tasks, but i'dont want a task to be switch, if a interupt is currently running
The CPU won't tell you if the ISR is being called from inside another ISR, and you can't reliably tell from the PIC. However, it's easy to keep track of how many levels of interrupt nesting you have (just increment a variable when you enter an ISR and decrement it when you leave).
the second question is: how can i determine the sector size of a disk, must i rely on the first sector (with fat there's a sector size statement, but what's with non fat disks?)?
Different storage devices have different ways of reporting their size. IDE devices support the IDENTIFY command, which will tell you the device's size in terms of both cylinders/heads/sectors and total sectors; you should use the total sector count since its limit is a lot greater.
In general, floppy drives don't know how big the floppy in the drive is. You can either try seeking to the largest track number possible, and keep reducing that until the seek is successful. However, that takes time and would probably result in a grating sound from the floppy disk. You should be able to assume that any file system format which supports floppy drives keeps track of the total size somewhere (e.g. the boot sector for FAT).