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

problems with unsigned long

Hi,

I'm having a problem using unsigned long.
Im using the LARGE memory model.

unsigned long largeWait;
largeWait = 10000;
while(largeWait--);

when I run this on my chip I never exit the loop.
Any Ideas? Are there known bugs concerning unsigned long?

this code for example works:
unsigned long data largeWait;
largeWait = 10000;
while(largeWait--);

this code works as well:
unsigned short largeWait;
largeWait = 10000;
while(largeWait--);

Thanks

Parents
  • In large memory model, everything will be XDATA - have you configured your chip so that it knows how to access XDATA memory? And is there any XDATA memory for the processor to access?

    Maybe you are reading/writing "air" instead of having a variable properly stored in RAM.

Reply
  • In large memory model, everything will be XDATA - have you configured your chip so that it knows how to access XDATA memory? And is there any XDATA memory for the processor to access?

    Maybe you are reading/writing "air" instead of having a variable properly stored in RAM.

Children