Originally posted by civix
neat-o!! I doubt i could make anything under 100kb even if i tried...
Well here you go.......this produces a Hello World executable that's 26 bytes....that should start you off!!!!
Code:
#include <fstream>
#include <cstdlib>
using namespace std;
int main()
{
char szProgName[] = "Small.COM";
unsigned char MySmallProg[] =
{0xBA,0x0E,0x01,0xB4,0x09,0xCD,0x21,
0xB4,0x4C,0x32,0xC0,0xCD,0x21,0x00,
0x48,0x65,0x6C,0x6C,0x6F,0x20,0x57,
0x6F,0x72,0x6C,0x64,0x24};
ofstream os(szProgName,ios::binary | ios:: out);
os.write((const char*)MySmallProg,26);
os.close();
system(szProgName);
return 0;
}