Not sure this is useful but->
As far as I can tell any program less than 512 bytes running
independently from any operating system can simply
be written to sector number 0 of a disk which will be loaded and executed when booting from the disk.
One of the easiest ways to experiment with this I can think of
is to use Debug.exe to create a small assembly program and
to then write it to a disk.
The BIOS will load 512 bytes from the first sector on any disk it attempts to boot from and execute it as a computer program.