Here's a kind of neat C++ program, part of a project for a class I'm taking (Host and Application Security)
#include <fstream>
using namespace std;
int main () {
ofstream comFile;
comFile.open("C:\\8086\\test.com");
unsigned char bytes[] = { 0x0E, 0x1F, 0xBA, 0x0E, 0x01, 0xB4, 0x09, 0xCD, 0x21, 0xB8, 0x01, 0x4C, 0xCD, 0x21, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64, 0x21, 0x0D, 0x0D, 0x24 };
comFile << bytes;
comFile.close();
return 0;
}
Run the .COM file it outputs in DOS...