a Assembly file dis_buffer: DS (%END_ACQ_CHAP+1)*1024+(3*1024) ;[1][1024]
a C file extern unsigned char xdata dis_buffer[8][1024]; . . . dis_buffer[15][(5 * 15) + k] = (dis_buffer[15][k] & mask[(k % 15) % 3]);
It's quite impossible to judge what might or might not be wrong here, given the incomplete example: *) That '%' in your ASM file is a typo, I guess? *) what is END_ACQ_CHAP defined to be? There is an obvious error in the C part (you're addressing beyond the span of the first index), but due to the way C works, that may be impossible to catch by the compiler, depending on what the part of your C code you snippet away actually is.