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

64K boundaries on DS80C400

While executing the following code:

 char far * buf;
 buf=FARRAY(char, 0x8FFF0);
 printf("%p\r\n",buf);
 buf+=0x100;
 printf("%p\r\n",buf);
I get the following result printed:
x:08fff0
x:0800f0
Obviously, the MSB of the pointer is not updated. Why? Is this a known bug in C51?
Settings: device DS80C400, C51 v7.50, Memory Model Large (variables in XDATA), contiguous mode 16M, 'far' memory type support - checked.

Parents
  • It's a known limitation. But since it's documented, it's not a bug. Objects in contiguous mode can be far away, yes, but that doesn't mean they must also be able to be huge, or be allowed to straddle 64K page boundaries. Even the compilers for 16-bit platforms often don't fully support objects straddling 64K boundaries, what did you expect from an 8-bit platform?

Reply
  • It's a known limitation. But since it's documented, it's not a bug. Objects in contiguous mode can be far away, yes, but that doesn't mean they must also be able to be huge, or be allowed to straddle 64K page boundaries. Even the compilers for 16-bit platforms often don't fully support objects straddling 64K boundaries, what did you expect from an 8-bit platform?

Children