That is true for modern operating systems. The BIOS (Basic Input Output System) ran as the layer under DOS before Windows NT. I remember writing DOS apps, and invoking both DOS and BIOS interrupts to get things done with the disks, keyboard and monitor. DOS acted as a layer on top of the BIOS, so it was still generally used even when you made a call to DOS. Back in the day the BIOS code would have been a strong contender except for the fact that it was written in assembler and therefore disqualified.
I think you're on the right track though... The microcontrollers which run hard disk drives execute the same code repeatedly, and while many microcontrollers are programmed in assembler, I prefer to do my microcontroller programming in C. I betcha some hard drives have microcontrollers executing code written in C.
As you might have imagined, my beard is grey.