LILO (Linux Loader) is a boot manager to load linux kernels or any operation system (DOS, OS2, Win95, NT). Linux kernels could be on any HD, but the other op systems had to be on device 0x80 (first HD) or device 0x81 (second HD) (or on a floppy). I did not know how I could boot from a DOS partition on my third HD. So I analysed what any_d.b did: it had three lines of code TEST DL,80 JZ +3 XOR DL,01 That means that Device 0x80 and 0x81 are swapped. For my purpose, I modified that code to TEST DL,80 JZ +8 TEST DL,01 JNZ +3 XOR DL,02 in order to swap 0x80 and 0x82, but not 0x81 and 0x83 ! As this test appears 2 times in any_d.b, my modified routine got 10 bytes longer and some other adresses had to be changed accordingly.