2009-06-12 09:26 PM
How can define Global Variables number more than 256?
2011-05-17 06:03 AM
Hi
I can not compilier programm as follows: unsigned char buf1[200]; unsigned char buf2[200]; int main(void) { unsigned char i; for (i = 0; i < 200; i++) { buf1[i] = buf2[i]; } while (1); } #error clnk Release\test.lkf:1 segment .ubsct size overflow (150) How can I do? Best Regards wolver 2006-6-132011-05-17 06:03 AM
Hi Wolver,
You have to declare as follows: unsigned char buf1[200]; @near unsigned char buf2[200]; In short memory model by default, the variables are placed in the zero page area (0x00 - 0xff). But in your case, there are 400 variables. So there is an overflow for the variables which are not fitting in the zero page. So you have to use @near identifier to declare some variables in the RAM area starting from 0x100.2011-05-17 06:03 AM
Hi Jatin
Thank you! :) best Regards wolver 2009-6-13