internal timing
Posted: Sun Dec 07, 2008 5:17 pm
hello,
not so long ago I finished the most basic implementation of my floppy driver, it has not been tested IRL, only in bochs because it misses features like a timer that I have seen present in other drivers. Before testing it on a real system I wanted to add timing (and of course sensing whether or not the read went ok) in the hopes it would work fine on a real system almost on the first try. Now, personally I've decided to use the PIT as a timer system, my floppy driver sets a bit in a byte tested by my memory manager. If the test says the bit is set it will update the timer for the floppy disc driver. If the floppy driver then detects the value of it's timer is equal or above a preset value it will call of the timing and return to the function that called the timer in the first place. Now I was wondering how others have decided to implement timing?
not so long ago I finished the most basic implementation of my floppy driver, it has not been tested IRL, only in bochs because it misses features like a timer that I have seen present in other drivers. Before testing it on a real system I wanted to add timing (and of course sensing whether or not the read went ok) in the hopes it would work fine on a real system almost on the first try. Now, personally I've decided to use the PIT as a timer system, my floppy driver sets a bit in a byte tested by my memory manager. If the test says the bit is set it will update the timer for the floppy disc driver. If the floppy driver then detects the value of it's timer is equal or above a preset value it will call of the timing and return to the function that called the timer in the first place. Now I was wondering how others have decided to implement timing?