Home ==> Instruction list
ATtiny13

List of directives in AVR assembler language


DirectiveParameter(s)Description
Listing
.LISTSwitches the output in the list file on
.NOLISTSwitches the output in the list file off
Source code origin
.INCLUDE(filename)Assembles the code in the file
Target assembling segments
.CSEGAssembles into the program flash segment, address counter: Program Counter PC
.ESEGAssembles into das EEPROM segment, only labels and .ORG-/.DB-/.DW directives allowed, separate EEPROM address counter
.DSEGAssembles into the SRAM segment, only labels and .ORG-/.BYTE-/.WORD directives allowed, separate address counter
Address manipulation
.ORGAddressSets the address counter in the active segment, forward to the desired address
.BYTENReserves N bytes and increases the address counter by N
.WORDNReserves N words and increases the address counter by 2*N bytes
Tables
.DBb1,b2,..bn
"(Text)"
'c','h','a','r'
Inserts the bytes b1 to bn resp. the Ascii values of the text and characters into the code or EEPROM segment, code segment: requires an even number of bytes, otherwise a Null byte is inserted!
.DWw1,w2,..wnInserts the double byte value w1 to wn into the code or EEPROM segment
Symbols, names
.DEFName = RnAssigns the name to the register
.EQUName = valueAssigns the constant value to the named constant, no later re-assignment possible
.SETName = valueAssigns the value to the named variable, later re-assignments possible
.UNDEFNameRemoves the assignment of a register, constant or variable
Macros
.MACROName, ParameterStarts a macro of that name and with the given parameters
.ENDMACRO
.ENDM
Ends the macro definition
Type definitions
.DEVICE"Type name"Switches instruction checks on, use of undefined instructions in that device type causes an error
Messages, error handling
.MESSAGE"TEXT"Outputs the given text
.ERROR"TEXT"Causes an error and outputs the given text
Conditional assembly
.EXITEnds assembling, further source code ignored
.IFConditionAssembles the following code only if the condition is true, requires .ENDIF
.IFDEFSymbolAssembles the following code if the symbol is defined, requires .ENDIF
.ELSEAssembles the following code if the condition in .IF is false or the symbol in .IFDEF is not defined
.ELIFConditionAssembles the following code if the condition in .IF is not true and the condition in .ELIF is true
.ENDIFEnds .IF, .IFDEF, .ELSE und .ELIF directives
gavrasm specialties
.DB%YEAR%
%MONTH%
%DAY%
%HOUR%
%MINUTE%
%SOURCE%
Inserts current date and filename in ASCII format
.IFDEVICE"Device name"Conditioned assembly if the device name is valid, requires previous .DEVICE or .INCLUDE "e;*def.inc"e

©2017 by www.avr-asm-tutorial.net