as: AVR-Modifiers

1 
1 9.5.2.3 Relocatable Expression Modifiers
1 ........................................
1 
1 The assembler supports several modifiers when using relocatable
1 addresses in AVR instruction operands.  The general syntax is the
1 following:
1 
1      modifier(relocatable-expression)
1 
1 'lo8'
1 
1      This modifier allows you to use bits 0 through 7 of an address
1      expression as 8 bit relocatable expression.
1 
1 'hi8'
1 
1      This modifier allows you to use bits 7 through 15 of an address
1      expression as 8 bit relocatable expression.  This is useful with,
1      for example, the AVR 'ldi' instruction and 'lo8' modifier.
1 
1      For example
1 
1           ldi r26, lo8(sym+10)
1           ldi r27, hi8(sym+10)
1 
1 'hh8'
1 
1      This modifier allows you to use bits 16 through 23 of an address
1      expression as 8 bit relocatable expression.  Also, can be useful
1      for loading 32 bit constants.
1 
1 'hlo8'
1 
1      Synonym of 'hh8'.
1 
1 'hhi8'
1 
1      This modifier allows you to use bits 24 through 31 of an expression
1      as 8 bit expression.  This is useful with, for example, the AVR
1      'ldi' instruction and 'lo8', 'hi8', 'hlo8', 'hhi8', modifier.
1 
1      For example
1 
1           ldi r26, lo8(285774925)
1           ldi r27, hi8(285774925)
1           ldi r28, hlo8(285774925)
1           ldi r29, hhi8(285774925)
1           ; r29,r28,r27,r26 = 285774925
1 
1 'pm_lo8'
1 
1      This modifier allows you to use bits 0 through 7 of an address
1      expression as 8 bit relocatable expression.  This modifier useful
1      for addressing data or code from Flash/Program memory.  The using
1      of 'pm_lo8' similar to 'lo8'.
1 
1 'pm_hi8'
1 
1      This modifier allows you to use bits 8 through 15 of an address
1      expression as 8 bit relocatable expression.  This modifier useful
1      for addressing data or code from Flash/Program memory.
1 
1 'pm_hh8'
1 
1      This modifier allows you to use bits 15 through 23 of an address
1      expression as 8 bit relocatable expression.  This modifier useful
1      for addressing data or code from Flash/Program memory.
1