Programs like page defrag by sysinternals or the chkdsk utility that run on startup. Please enlighten me. What kind of programming language do they use for these kinds of operations.
This is more a function of the operating system than programming language.
For example, on Windows, these types of programs often install as a service. A separate program is often run as the user, and set (via the registry) to start on login, in order to interact with the service.
They need to work with a specific boot time version of the kernel API, hence C or C++ is the usual language.
There is brief coverage of this in "Windows Internals", but nothing like enough to write such a utility.
What usually happens is that the developer creates a booter loader that they load on storage device (such as HDD, CD/DVD, USB, etc).
The bootloader has (if I remember correctly, it's been over 8 years since I did this) 512K address to point to a startup register (usually 08h
). That 512K address will store your address to your environment variables, startup address, etc.
The developer then writes a program and sets his main
method to point to the startup boot address (usually 08h
but that is not standard, it is vendor specific) so that when the bootloader points to the startup address, the program connected to the startup address is booted and run.
Language, hardcore C/C++/Assembly (or Pascal since it is capable of doing so).