Skip to main content
Renesas India - Knowledgebase

Do word instructions determined automatically or must be specified?

Latest Updated:12/01/2011


The instruction length differs depending on whether saddrp1 or saddrp2 is used with the MOVW saddrp, #word instructions, but it is determined automatically or must it be specified?


If nothing is specified, processing as saddrp1 (longer instruction) is performed.
If you expect a short instruction as saddrp2, perform symbol definition after specifying saddrp2 by operand as the relocation attribute when declaring "DSEG" for data definition.

   area1        DSEG       saddrp2
   data1:       DS         2
                MOVW        data1,#0H

When the above is described, this MOVW instruction becomes a short instruction.
For details, refer to the DSEG section under quasi directives in the Language User's Manual.

Suitable Products