A traditional BIOS can also boot an arbitrary payload. You can hijack INT 0x18 (boot to BASIC) to do whatever you want.
A lot of clone BIOSes just had to branch to a "please insert bootable media" or "No ROM BASIC - System Halted" message, but you could fairly easily inject something much like this.
I've modified the old "Anonymous XT clone" BIOS to support a stub that copies a chunk of ROM into RAM and then executes it.
This works reasonably well with some of the 512-byte "boot sector" tools I've tried, or with some minimal DOS .COM executables (i. e. an old Tiny Basic.) The copying step is a conservative approach because I suspect a lot of off the shelf software doesn't expect to be running inside ROM, and if it tries self-modifying code or simply writing to the same segment, all hell breaks loose.
For me, the limits were that, with an XT, you probably didn't want much more than 32-64k of ROM consuming precious address space, so unless you wanted to get gimmicky with banking in more memory or decompression, you're limited to maybe 20-40k of payload, which is a little small for "current" embeddable DOS products.
A lot of clone BIOSes just had to branch to a "please insert bootable media" or "No ROM BASIC - System Halted" message, but you could fairly easily inject something much like this.
I've modified the old "Anonymous XT clone" BIOS to support a stub that copies a chunk of ROM into RAM and then executes it.
This works reasonably well with some of the 512-byte "boot sector" tools I've tried, or with some minimal DOS .COM executables (i. e. an old Tiny Basic.) The copying step is a conservative approach because I suspect a lot of off the shelf software doesn't expect to be running inside ROM, and if it tries self-modifying code or simply writing to the same segment, all hell breaks loose.
For me, the limits were that, with an XT, you probably didn't want much more than 32-64k of ROM consuming precious address space, so unless you wanted to get gimmicky with banking in more memory or decompression, you're limited to maybe 20-40k of payload, which is a little small for "current" embeddable DOS products.