1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
//Original program
const unsigned short oldProg[] = { 'B', 'O', 'S', 'V', 0, 1, 383, 'C',
'S', 0, 1, 'D', 29, 6, 0,'D', 30, 6, 0, 'D', 31, 6, 0, 'D', 28, 6, 0,
'D', 32, 6, 0, 'D', 27, 5, 0, 'D', 33, 5, 0, 'D', 29, 2, 0,
'D', 31, 2, 0, 'D', 27, 4, 0, 'D', 33, 4, 0,//54 - Smiley
'D', 13, 27, 0, 'D', 13, 26, 0, 'D', 13, 25, 0, 'D', 13, 24, 0,
'D', 13, 23, 0, 'D', 13, 22, 0, 'D', 13, 21, 0, 'D', 13, 20, 0,
'D', 13, 19, 0, 'D', 14, 19, 0, 'D', 15, 19, 0, 'D', 16, 19, 0,
'D', 17, 19, 0, 'D', 18, 20, 0, 'D', 18, 21, 0, 'D', 18, 22, 0,
'D', 14, 23, 0, 'D', 15, 23, 0, 'D', 16, 23, 0, 'D', 17, 23, 0,//134 - P
'D', 20, 27, 0, 'D', 20, 26, 0, 'D', 20, 25, 0, 'D', 20, 24, 0,
'D', 20, 23, 0, 'D', 21, 23, 0, 'D', 22, 23, 0,//162 - r
'D', 25, 27, 0, 'D', 25, 26, 0, 'D', 25, 25, 0, 'D', 25, 24, 0,
'D', 25, 23, 0, 'D', 26, 23, 0, 'D', 27, 23, 0, 'D', 28, 23, 0,
'D', 28, 24, 0, 'D', 26, 25, 0, 'D', 27, 25, 0, 'D', 28, 25, 0,
'D', 26, 27, 0, 'D', 27, 27, 0, 'D', 28, 27, 0,//222 - e
'D', 31, 27, 0, 'D', 31, 25, 0, 'D', 31, 24, 0, 'D', 31, 23, 0,
'D', 32, 27, 0, 'D', 32, 25, 0, 'D', 32, 23, 0, 'D', 33, 27, 0,
'D', 33, 26, 0, 'D', 33, 25, 0, 'D', 33, 23, 0,//266 - s
'D', 35, 27, 0, 'D', 35, 25, 0, 'D', 35, 24, 0, 'D', 35, 23, 0,
'D', 36, 27, 0, 'D', 36, 25, 0, 'D', 36, 23, 0, 'D', 37, 27, 0,
'D', 37, 26, 0, 'D', 37, 25, 0, 'D', 37, 23, 0,//310 - s
'D', 45, 20, 0, 'D', 46, 20, 0, 'D', 47, 20, 0, 'D', 48, 20, 0,
'D', 49, 20, 0, 'D', 50, 20, 0, 'D', 50, 21, 0, 'D', 49, 22, 0,
'D', 48, 23, 0, 'D', 47, 24, 0, 'D', 46, 25, 0, 'D', 45, 26, 0,
'D', 45, 27, 0, 'D', 46, 27, 0, 'D', 47, 27, 0, 'D', 48, 27, 0,
'D', 49, 27, 0, 'D', 50, 27, 0,//382 - Z
'I', 'z', 387, 'K', 'E', 'Q' };//389 + 1 = 389 shorts = 778 bytes
/* Writing the original file*/
char* filename = "example.sm";
ofstream out;
out.open(filename, ios::binary | ios::out);
out.write((char*)&oldProg, sizeof(oldProg));
out.close();
|