This is not possible in a general way, and especially not for DOS OS and software, as they are making use of bios interrupts to communicate with the hardware. When a OEM makes the decision to remove legacy boot, there is 'no-one there' to receive the bios interrupts**.
For OSes which don't use BIOS interrupts, such as Linux distros, you can use Grub2.
But for DOS, (some of) your options are:
- on your hardware, roll back to your older BIOS which supported legacy boot
- use a Virtual DOS machine
- Get hardware whose OEM keeps committed to legacy mode (where are they?)
- Get hardware which supports the open-source coreboot UEFI implementation. Some OEMs directly make such hardware. Or some coreboot implementations (Libreboot, Canoeboot, Skulls) support various specific pc and laptop models from Lenovo, Asus, Mac, Dell, Gigabyte, HP.
** Explanation: In DOS (and some other legacy OS) BIOS interrupts are used to interface hardware, for such basic operations as screen output or keyboard input. Expressed in simplest terms, in a BIOS interrupt the CPU reads an instruction set from a given memory address. These instruction sets are hardware-specific and thus must be provided by the OEM of the mainboard, or in any case be developed specifically for a given mainboard, and are loaded into memory at startup. That's what happens during legacy boot. If legacy boot is absent, such instruction sets are not available on the machine and there's no way they could be loaded into memory. And given that the BIOS interrupt instruction sets are hardware specific, there cannot be a generic solution for this, without virtualization.
Modern OSes use device drivers to communicate directly with the hardware, instead of using interrupts. So, a DOS virtual machine will translate the interrupts into device driver calls.