I am an electrical engineer who has recently discovered the need to modify the code in the MBR. Basically I need the ability to execute code on the HDD before, the OS starts up
Basically I figure I'll insert a call and leave the rest of the MBR alone
What will be called by this subroutine call? The only code in memory at that point is whatever is in the MBR or ROM.
Please think carefully about whether you really need this or that's there's not a better alternative before you spend too much time on it. Third-party code written to an MBR (other than the MBR that the OS loader puts in there) is often not well received by users because:
So if you do decide to continue on this path, please tread carefully and be prepared for headaches.