Code:
uint8_t Alphabet[208]={
0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x7e, 0x0, //A
0x3e, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x3e, 0x0, //B
0x3c, 0x42, 0x2, 0x2, 0x2, 0x42, 0x3c, 0x0 ,//C
0x3e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x0, //D
0x7e, 0x2, 0x2, 0x7e, 0x2, 0x2, 0x7e, 0x0 ,//E
0x2, 0x2, 0x2, 0x3e, 0x2, 0x2, 0x7e, 0x0, //F
0x3c, 0x42, 0x62, 0x2, 0x2, 0x42, 0x3c, 0x0, //G
0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x0, //H
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0, //I
0x18, 0x24, 0x20, 0x20, 0x20, 0x20, 0x70, 0x0, //J
0x22, 0x12, 0xa, 0x6, 0xa, 0x12, 0x22, 0x0, //K
0x7e, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x0, //L
0x41, 0x41, 0x41, 0x49, 0x55, 0x63, 0x41, 0x0, //M
0x41, 0x61, 0x51, 0x49, 0x45, 0x43, 0x41, 0x0, //N
0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x0, //O
0x2, 0x2, 0x2, 0x3e, 0x42, 0x42, 0x3e, 0x0, //P
0xbc, 0x62, 0x52, 0x42, 0x42, 0x42, 0x3c, 0x0,//Q
0x62, 0x12, 0xa, 0x3e, 0x42, 0x42, 0x3c, 0x0, //R
0x1c, 0x22, 0x4, 0x8, 0x10, 0x22, 0x1c, 0x0, //S
0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x3e, 0x0, //T
0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x0, //U
0x8, 0x14, 0x22, 0x41, 0x41, 0x41, 0x41, 0x0, //V
0x63, 0x55, 0x49, 0x41, 0x41, 0x41, 0x41, 0x0, //W
0x41, 0x22, 0x14, 0x8, 0x14, 0x22, 0x41, 0x0, //X
0x8, 0x8, 0x8, 0x8, 0x14, 0x22, 0x41, 0x0, //Y
0x3e, 0x2, 0x4, 0x8, 0x10, 0x20, 0x3e, 0x0 //Z
};
int8_t i,k;
uint8_t offset=no_of_device*8, buffer_size=offset*2;
uint8_t display_buffer[buffer_size];
for (i=0;i<buffer_size;i++) // initialize array to zero
display_buffer[i]=0;
for (i=0;i<buffer_size;i++) // copy data to display_buffer with offset
display_buffer[i+40]=Alphabet[i];
printf("before shifting action\n"); // printing array's content before shifting
for (i=0;i<buffer_size;i++){
printf("%.2x, ",display_buffer[i]);
if(i%8==7) printf("\n");}
printf("after shifting action\n"); // printing array's content after shifting
for (i=0;i<buffer_size;i++){
for (k=0;k<8;k++){
display_buffer[i]>>=1;
printf("%.2x, ",display_buffer[i]);}printf("\n");}
So, because I'm initializing the array to zero, when applying offsets of any number to exactly 28, but after 28 the bytes before the offset are filled with certain data where they should be zeros.