Page crossing detected and XPAGEOFF enabled

Question: When compiling the firmware with the USB M8 Series Hi Lo Programmers and the following message occurred: "warning : Page crossing detected and XPAGEOFF enabled." Why?

 

Answer:

The reason you see this warning is that you reach the end of the page and you have XPAGEOFF.

The memory is organized into 256 byte pages. By having XPAGEON (default), the assembler automatically puts an XPAGE instruction at the end of a 256 byte page to move the last assembly code from the current page to the next page. (If the last instruction is a 2 byte instruction, a NOP and XPAGE is inserted).


The following practice is what you normally see in our sample codes where we have a table.

XPAGEOFF

ORG  0x$$    ;where $$ is the beginning of a new page

JumpTable:

  jmp ...

  jmp ...

  ...

EndJumpTable:

XPAGEON