This is a very simple program for the Commodore plus/4 that saves the ROMs of the computer and the connected floppy drives to disk.
The save destination is the last used device (based on the value of $ae). In normal case this is the device where the program was loaded from but it can be changed to device 9 with the DIRECTORY U9 command. (or anything else that uses standard kernal routines)
During the save process the program checks what ROMs are present (banks 0-3 lower/higher part) and saves only those where there is a stable readout for the ROM's first byte. In the next step it checks what drives are connected and saves the ROMs from those too (in case of a detected 1570/1571/1581 it saves 32kB ROM for the others 16kB only).
PS: current emulators always give stable readout for non-existent ROMs too so it will save empty ROMs from emulators. :)