DOSBox has been ported to i-devices and is called iDOS. It is available in the App Store.
When iDOS originally came out, it gave you the ability to load games, programs, etc onto your i-device through iTunes. Apple saw this as a violation of their terms so the program was taken off the App Store. The developers then took out the ability to file share through iTunes and instead preloaded several classic DOS games (presumably with the game developers' permissions). The downside is that you no longer had the ability to load any programs into iDOS.
But wait! You can still load whatever DOS program you want onto your i-device with a little trickery. You'll need Macroplant's iPhone Explorer. From the iPhone Explorer home page:
iPhone Explorer lets you use an iPhone, iPod Touch or iPad as if it were in disk mode or a flash drive. iPhone Explorer is an iPhone browser for Mac & PC that lets you browse the files and folders on your iPhone as if it were a normal USB flash drive or pen drive. You can use the easy drag-and-drop methods to add or remove files and folders from the iPhone. Compatible with all iPhones and iPod Touches including the new iPhone 4 and iOS 4 firmware.
Once iPhone Explorer has been installed and iDOS updated to the newest version, plug in your iPhone (or other i-device). With your iPhone plugged in, expand the phone & select "Apps". Find iDOS, and the folder inside it is called "Documents". This is your iDOS "C:" Drive. Copy your game folder/files to this area (probably best under the "games" folder).
That's it! You can now copy whatever DOS games/programs to your i-device.
Btw, your iPhone, iPad, or iPod Touch doesn't need to be jailbroken to do this!