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

Agsi.SetWatchOnMemory

i want to watch the pdata page
i use the code
Agsi.SetWatchOnMemory(amPDATA,amPDATA + 0x100,MemoryReadWatch,AGSIREAD);

it no effect..
so i change

Agsi.SetWatchOnMemory(amPDATA << 16,amPDATA << 16 + 0x100,MemoryReadWatch,AGSIREAD);

it no effect too..

how to use the function can i get the amPDATA real address to watch...

  • There are two problems:

    1) The memory specifier (amPDATA, amXDATA etc.) must be shifted into the most significant byte of the address. This means that you need to shift amPDATA left 24 times.

    2) amPDATA is not supported for memory watches. 'pdata' is one 256 byte page within 'xdata' but its absolute xdata address usually depends on P2 (or other registers depending on the device).

    Workaround: Please set a memory watch to the corresponding xdata address range instead.
    Example:
    Agsi.SetWatchOnMemory(0xFF00 + (amXDATA << 24), 0xFFFF + (amXDATA << 24),MemoryReadWatch,AGSIREAD);

    Hans