Everything

MIRHW


Obtains the higher-order 16 bits of the corresponding address in the mirror destination area when the value of the specified term is in the mirror source area.

[Function]

When the value of the specified term is in the mirror source area, the higher-order 16 bits among the 32 bits of the corresponding address in the mirror destination area are returned.

When the value of the term is outside the mirror source area and the term is an absolute term (see "5.1.14 Restrictions on operations"), the same value as for HIGHW is returned. When it is a relocatable term, an error will occur at linkage.

[Application example]

MOVW    AX, #MIRHW(0x00001000)          ; (1)

(1)

When the target expression (0x00001000) for operation is in the mirror source area, 0x00001000 is converted to the corresponding mirror destination address (0x000F9000 for an 8-bit CPU or 0x000F1000 for a 16-bit CPU) and the value of the higher-order 16 bits (0x000F) is loaded in the AX register by executing the MOVW instruction.