This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

array pb

 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]);

I've such an array defined in a assemler module and I try to acces to the same array with the following assignment and compiler dont mention any error. Program built with succes.

I think there must be a problem but nothing happens not any error nor warning...

any help

Parents
  • 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.

Reply
  • 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.

Children
No data