Skip to main content

IAR Embedded Workbench for RL78 5.20

The far memory access method

In this section:

Far memory is the entire 1 Mbyte memory area with the constraint the each object must fit withing a 64 Kbytes page.

Examples

These examples access far memory in different ways:

            mov    es, byte3(x)   ; Access the global variable x.
            mov    a, es:x

            addw   ax, #lwrd(y)   ; Access an entry in the
            movw   hl, ax         ; global array y.
            mov    es, byte3(y)
            mov    a, es:[hl]

            mov    a, es:[hl+2]   ; Access through a pointer.