Hi,
I would suggest you to go to
LAMA's S12XE unofficial examples
and search for:
XEP100-RAM-addressing-v1_0-CW51.zip
Of course, I have also attached it here. I only wanted to show you more examples.
Also it is good to absolutely understand memory access possibilities. Attached memory map.
If you want, for example, create large arrays (larger than one page) then access to memory via global memory and global instructions is better.
Best regards,
Ladislav