I’ve spent the evening looking at bootloader source code (small programs, crucial to every Operating System, which do the first fundamental steps towards loading the kernel, the ‘core’ of the OS). Just to show you quite how scary this stuff is, here’s a snippet of code to “stop the floppy drive motor from spinning”:
mov dx,3F2h
mov al,0
out dx,al