The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

Figure 2-0. Table 2-0. Listing 2-0. Listing 2-0. easm218x.exe ass


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



ASSEMBLER
Figure 2-0. Table 2-0. Listing 2-0. Listing 2-0.
easm218x.exe assembler runs from operating system command line from VisualDSP environment. assembler processes assembly source, data, header files, produces object file. Assembler operations depend types controls: assembler directives assembler switches. Assembler directives coded your assembly source file. directives define variables your program, some hardware features, identify your program's sections* placement within memory. assembler uses directives guidance translates your source into object code. Assembler switches specified operating system's command line Assemble VisualDSP environment's Project Options dialog box. These switches allow control assembler processes your assembly source, data, header files. Using these switches, select features, such search paths, output file names, macro preprocessing, among others. This chapter provides assembler information that need know when developing assembling programs ADSP-218x family DSPs.
assembler section .SECTION) declaration referred here corresponds linker input section.
Assembler Manual ADSP-218x Family DSPs
chapter contains following information about assembler: "Assembler Guide" page "Assembler Command-Line Reference" page 2-15 "Assembler Syntax Reference" page 2-29 "Assembler Glossary" page 2-61
Assembler Manual ADSP-218x Family DSPs
Assembler
Assembler Guide
guide section describes process developing programs ADSP-218x family DSPs assembly language. discussion also covers conventions should follow when assembling source programs developed under Release 6.1. This section provides information that need know when assembling your programs from operating system's command line. Software developers using assembler should familiar with following operations: "Writing Assembly Programs" page "Preprocessing Program" page 2-13 "Reading Listing File" page 2-13 "Setting Assembler Options" page 2-14
Writing Assembly Programs
Write your assembly language programs using VisualDSP editor editor that produces text files. word processor that embeds special control codes text. Append .ASM extension your source file names identify them Release assembly source files. Assemble your source files, either using assembler's command line from VisualDSP environment. default mode operation, assembler processes input file through listed stages produce binary object file (.DOJ) optional listing file (.LST). Object files serve input linker when link your executable program. These files Executable Linkable Format (ELF), industry-standard format object files. addition, assembler
Assembler Manual ADSP-218x Family DSPs
Assembler Guide
embed binary information Debugging Information Format (DWARF-2) source level debugging. Listing files text files that read information results assembly process.
Release assembler process your source programs developed under Release 6.1. assembly these programs requires additional processing step described "Assembler Enhancements Legacy Support" page 3-1.
Figure page shows graphical overview assembly process. figure shows preprocessor processing assembly source (.ASM) initialization data (.DAT) files. assembly source file often contains preprocessor commands, such #include, that causes preprocessor include header files (.H) into your source program. preprocessor's only output, intermediate source file (.IS), assem-
Assembler Manual ADSP-218x Family DSPs
Assembler
bler's primary input. binary object (.DOJ) optional listing (.LST) files final results successful assembly.
Data initialization file (.DAT)
Assembly source file (.ASM)
Header file (.H)
Preprocessor
Intermediate preprocessed file (.IS)
Assembler
Object file (.DOJ)
Listing file (.LST)
Figure 2-1. Assembler Input Output Files
Assembler Manual ADSP-218x Family DSPs
Assembler Guide
Program Content Statements within assembly source file comprised assembly instructions, assembler directives, preprocessor commands. Instructions assemble executable code, while directives commands modify assembly process. syntax these statement types follows: Assembly instructions Instructions follow DSP's instruction syntax documented DSP's user manuals. Each instruction begins with keyword ends with semicolon (;). mark location instruction, place address label beginning instruction line preceding line. label with colon before beginning instruction. then refer this memory location your program using label instead absolute address. Although there length restriction when defining labels, convenient limit them length screen line, typically eighty characters. Labels sensitive case. assembler treats "outer" "Outer" unique labels. Example:
outer: DM(I1,M1)=AR; start: AX0=0X1234;
Assembler directives Directives begin with period with semicolon (;). period must first character line containing your directive. assembler does differentiate between directives lowercase uppercase characters. Note that this manual prints directives uppercase distinguish them from other assembly statements.
Assembler Manual ADSP-218x Family DSPs
Assembler
Example:
.SECTION/DM data1; .VAR sqrt_coeff[2] 0x5D1D, 0xA9ED;
complete description directive ADSP-218x assembler, "Assembler Directives" page 2-41. Preprocessor commands Preprocessor commands begin with pound sign with carriage return. pound sign must first character line containing command. command longer than line, backslash carriage return continue command next line. characters between backslash carriage return. Unlike assembly directives, preprocessor commands case-sensitive must lowercase. list preprocessor commands, Table page 4-17. Example:
#include "string.h" #define
Figure page contains example assembly source file. Program Structure assembly source file must describe code data mapped into memory your target DSP. There types memory: data memory, which typically contains data memory-mapped ports, program memory, which typically contains code (and also store data). structure your code data into memory should follow from memory architecture target DSP. mapping code data accomplished using .SECTION directive (formerly .DMSEG .PMSEG). .SECTION directive defines groupings instructions data that contiguous memory
Assembler Manual ADSP-218x Family DSPs
Assembler Guide
addresses DSP. Each .SECTION name corresponds input section name Linker Description File (.LDF). Some suggested section names that could your assembly source appear Table 2-1. Using these predefined names your sources makes easier take advantage default Linker Description File included your system. more information LDF, Linker Utilities Manual ADSP-21xx Family DSPs. Table 2-1. Suggested Input Section Names
.SECTION Name data1 data2 program Description section Data Memory that holds data. section Program Memory that holds data. section Program Memory that holds code.
create sections program grouping elements meet hardware constraints. group code that reside off-chip memory, declare section that code place that section selected memory with linker. Figure page shows program divides into sections that match program data memory segmentation system.
Assembler Manual ADSP-218x Family DSPs
Assembler
Data Section Data Section
.SECTION/DATA int_dm1; .VAR buffer1[0x100] "text2.txt"; .SECTION/DATA dummy; .VAR buffer2[0x100]; .SECTION/DATA int_dm3; .VAR buffer3; .SECTION/PM seg_1; .VAR/INIT24 pm_buffer1 0x123456; .SECTION/CODE seg_rth; JUMP start; RTI;RTI;RTI; begin execution RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; RTI;RTI;RTI;RTI; .SECTION/CODE kernel; start: #ifndef AR_SET_TO_2 0x0001; #endif #ifdef AR_SET_TO_2 0x0002; #endif buffer1; CNTR 0x100; this_loop UNTIL this_loop: DM(I1,M2)
Data Section Code Section Assembler Directive Code Section Assembler Label Instructions
Code Section Assembler Label Preprocessor Commands Conditional Assembly
Assembly Instructions
Figure 2-2. Example Assembly Source File
Assembler Manual ADSP-218x Family DSPs
Assembler Guide
sample assembly program splits into sections; each section begins with .SECTION directive ends with occurrence next .SECTION directive end-of-file. source program contains three data three program sections: Data Sections int_dm1, dummy, int_dm3. Variables buffers declared initialized. Program Sections seg_1, seg_rth, kernel. Data instructions coded these sections, including statements that needed conditional assembly. Looking Figure page 2-9, notice that assembly source often contains preprocessor commands, such #include inclusions other files your source code, #ifdef conditional assembly, #define macro definitions. assembler directives, such .VAR, appear within section declare initialize variables. Figure page 2-12 shows sample user-defined Linker Description File. Looking LDF's SECTIONS{} command, notice that input sections' names match program memory data memory sections' names used assembly sample program (Figure page 2-12). LDF's SECTIONS{} command defines .SECTIONs placements ADSP-218x system's physical memory defined linker's Memory{}command.
2-10
Assembler Manual ADSP-218x Family DSPs
Assembler
ARCHITECTURE(ADSP-2181) SEARCH_DIR( $ADI_DSP\218x\lib //Libraries from command line included COMMAND_LINE_OBJECTS $OBJECTS $COMMAND_LINE_OBJECTS; MEMORY seg_rth {TYPE(PM RAM) kernel {TYPE(PM RAM) seg_1 {TYPE(PM ROM) int_dm1 {TYPE(DM RAM)
START(0x00000000) END(0x000000ff) WIDTH(24)} START(0x000100) END(0x00fff) WIDTH(24)} START(0x001100) END(0x040ff) WIDTH(24)} START(0x00000) END(0x087cf) WIDTH(16)}
int_dm3 {TYPE(DM RAM) START(0x09000) END(0x0c000) WIDTH(16)} PROCESSOR LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST) OUTPUT( $COMMAND_LINE_OUTPUT_FILE SECTIONS seg_rth INPUT_SECTIONS( $OBJECTS(seg_rth) >seg_rth seg_code INPUT_SECTIONS( $OBJECTS(kernel) >kernel seg_code2 INPUT_SECTIONS( $OBJECTS(seg_1) >seg_1 seg_data1 INPUT_SECTIONS( $OBJECTS(int_dm1) >int_dm1
Assembler Manual ADSP-218x Family DSPs
2-11
Assembler Guide
seg_data11 INPUT_SECTIONS( $OBJECTS(dummy) >int_dm1 seg_data3 INPUT_SECTIONS( $OBJECTS(int_dm3) >int_dm3
Figure 2-3. Sample Linker Description File Program Interfacing Requirements some point, want interface your assembly program with program. compiler supports methods mixing assembly language: embedding assembly code programs, linking together assembly routines. embed (inline) assembly code your program, asm() extension. link together programs that contain assembly routines, assembly interface macros. These macros facilitate assembly mixed routines. more information about these methods, refer "Using Predefined Macros" page 4-7. When write program that interfaces with assembly, must observe rules that compiler follows produces code DSP. These rules compiled code called compiler's runtime environment. Complying with runtime environment means following rules memory usage, register usage, commenting, variable names. information particular compiler's run-time environment, compiler's user manual. definition run-time environment ADSP-218x compiler located Compiler Library Manual
2-12
Assembler Manual ADSP-218x Family DSPs
Assembler
ADSP-218x Family DSPs, which also includes series examples demonstrate assembly code.
Preprocessing Program
assembler includes preprocessor that allows C-style preprocessor commands your assembly source files. Table page 4-17 lists preprocessor commands provides brief description each command. preprocessor automatically runs before assembler unless assembler's (skip preprocessor) switch. Preprocessor commands useful modifying assembly code. example, #include command fill memory, load configuration registers, parameters. #define command define constants aliases frequently used instruction sequences. preprocessor replaces each occurrence macro reference with corresponding value series instructions. example, macro example page replaced with number during preprocessing. Note that preprocessor also automatically removes comments from assembler-generated optional listing files. more information preprocessor command set, "Preprocessor" page 4-1.
Reading Listing File
listing file (.LST) optional output text file that lists results assembly process. Listing files provide following information: Address first column contains offset from .SECTION's base address. Opcode second column contains hexadecimal opcode that assembler generates line assembly source.
Assembler Manual ADSP-218x Family DSPs
2-13
Assembler Guide
Line third column contains line number assembly source file. Assembly Source fourth column contains assembly source line from file. Note that comments appear listing file. Building your source file with preprocessor automatically removes comments. output comments listing output, must skip preprocessing entirely using switch.
Setting Assembler Options
When developing project, find useful modify assembler's default options settings. assembler options depends environment used development software: From operating system command line, select assembler's command-line switches. more information these switches, "Assembler Command-Line Interface" page 2-16. From VisualDSP environment, assembler's options Project Options dialog Project menu. more information these option settings, VisualDSP User's Guide ADSP-21xx Family DSPs online Help.
2-14
Assembler Manual ADSP-218x Family DSPs
Assembler
Assembler Command-Line Reference
ADSP-218x assembler processes data from assembly source (.ASM, .DSP), data (.DAT), header (.H), preprocessed (.IS, .APP) files generate object files Executable Linkable Format (ELF), industry-standard format binary object files. assembler's primary output file .DOJ extension. assembler's secondary outputs optional listing files (.LST) information binary Debugging Information Format (DWARF-2), which embedded object file. linking together separately assembled object files, linker produces executable programs (.DXE). archive output assembly process into library file (.DLB), which then linked with other objects into executable. Because archive process performs partial link, placing frequently used objects library reduces time required subsequent links. more information archiver, Linker Utilities Manual ADSP-21xx Family DSPs. This section provides reference information assembler's switches, directives, expressions, conventions. reference information available these topics follows: "Assembler Command-Line Interface" page 2-16 This section describes assembler's switches, which accessible from operating system's command line from VisualDSP environment. "Assembler Keywords Symbols" page 2-29 This section describes assembler's predefined keywords provides rules user-defined symbols.
Assembler Manual ADSP-218x Family DSPs
2-15
Assembler Command-Line Reference
"Assembler Expressions" page 2-34 This section describes assembler's numeric relational operators other conventions syntax. "Assembler Directives" page 2-41 This section describes assembler's directives, including syntax usage examples.
Assembler Command-Line Interface
This section describe Release assembler command-line interface option (switch) set. Switches control certain aspects assembly process, including library searching, listing, preprocessing. Because assembler automatically runs preprocessor your program assembled (unless switch), assembler's command line receive input preprocessor program direct operation. more information preprocessor, "Preprocessor" page 4-1. assembler from command line, type name assembler program followed arguments order:
easm218x [-switch1 [-switch2 [sourceFile]
Where: Name assembler program ADSP-218x family DSPs.
easm218x
2-16
Assembler Manual ADSP-218x Family DSPs
Assembler
-switch1,-switch2
Switches process.
assembler offers many optional switches that select operations modes assembler preprocessor. Some assembler switches take file name required parameter.
sourceFile
Name source file assemble.
assembler outputs list command-line options when without arguments (same -h[elp]). assembler supports relative absolute path names. When provide input output file name parameter, following guidelines naming files: Include drive letter path string file current directory. Enclose long file names double quotation marks, example, "long file name". Append appropriate file name extension each file. assembler uses each file's extension determine what operations perform. Table page 2-18 lists valid file extensions that assembler accepts. assembler handles file name extensions follows: Files with .ASM, .DSP, extension treated assembly source files assembled. Files with extension named #include command treated header files preprocessed. Files with .DAT extension named with switch treated data initialization files searched. File name typed lower uppercase defines same file.
Assembler Manual ADSP-218x Family DSPs
2-17
Assembler Command-Line Reference
Table summarizes file extension conventions that assembler follows. Table 2-2. File Name Extension Conventions
Extension .asm File Description
Assembly source file. Note that assembler treats files with unrecognized
extensions assembly source files with .asm extension. .app .dsp .lst .doj .dat Release preprocessed assembly source file. Release assembly source file. Preprocessed assembly source file. Header file. Listing file. Assembled object file ELF/DWARF-2 format. Data initialization file.
assembler command-line switches case-sensitive. following command line, example:
easm218x -2181 p1List.lst -Dmax=100 bin\p1.doj p1.asm
runs ADSP-218x family assembler with:
-2181
Specifies ADSP-2181 DSP. Directs assembler output listing file.
p1List.lst -Dmax=100
Defines macro equal 100.
2-18
Assembler Manual ADSP-218x Family DSPs
Assembler
Displays verbose information each phase assembly. Specifies name directory assembled
bin\p1.doj
object output.
p1.asm
Identifies assembly source file assemble.
following command line, example:
easm218x -2187 -legacy test.doj program2.dsp
runs ADSP-218x family assembler with:
-2187
Specifies ADSP-2187L DSPs. Processes source code developed under Release 6.1.
-legacy
Preserves case-sensitivity assembly symbols. Renames assembled object file. Specifies source file Release.
test.doj program2.dsp
Command-Line Options This section describes easm218x command-line option set. summary assembler switches appears Table 2-3, brief description each switch appears "Command-Line Reference" page 2-21. Table 2-3. easm218x Command-Line Switches
Switch Name -218[1|3|4|5|6|7|8|9] -ESP202 Usage Description Assembles instructions unique ADSP-218x processors, including ADSP-ESP202. This switch required assembler. Writes RESOVLE() commands absolute placement specified .ldf header file.
-esp202
filename
Assembler Manual ADSP-218x Family DSPs
2-19
Assembler Command-Line Reference
Table 2-3. easm218x Command-Line Switches (Cont'd)
Switch Name Usage Description Directs assembler preserve case- sensitive mode. Defines macro. Generates debug information (DWARF-2 format). Outputs list assembler switches. Searches directory .dat files. Outputs named listing file. Accepts legacy code. Makes dependencies only, does assemble. Makes dependencies assembles. Specifies filename make dependencies output file. Makes dependencies specified source file. Outputs named object file. Runs preprocessor only. Removes preprocessor information from listing file. Assembles without preprocessing. Displays information each assembly phase. Displays version info assembler preprocessor programs. Removes assembler-generated warnings.
-D|dmacro[=definition] -h[elp] -i|I directory filename -legacy filename
filename filename -v[erbose] -version
2-20
Assembler Manual ADSP-218x Family DSPs
Assembler
Command-Line Reference
This section lists assembler's command-line options (switches) ASCII collation order. brief description each option includes information about case-sensitivity, equivalent switches, switches overridden/contradicted described, naming spacing constraints parameters. -218[1|3|4|5|6|7|8|9] -218[1|3|4|5|6|7|8|9] (the ADSP-218x variant) switch directs assembler process instructions unique specific variant ADSP-218x DSPs: ADSP-2181, ADSP-2183, ADSP-2184/2184L, ADSP-2185/2185L/2185M, ADSP-2186/2186L/2186M, ADSP-2187L, ADSP-2188M, ADSP-2189M.
easm218x requires processor-specific switch command line.
filename (absolute placement) switch directs assembler write resolve commands specified Linker Description File (.ldf). This switch optional legacy assembly source programs with absolute placement directives. assembler generates RESOLVE() command each .VAR/ABS=address directive legacy source program, program developed under Release 6.1. assembler outputs resolve .ldf header file. linker inputs file manually referenced with INCLUDE() command) your project's Linker Description File. default resolve .ldf file name, composed `resolve_' prefix .ldf extension, override with filename argument.
Assembler Manual ADSP-218x Family DSPs
2-21
Assembler Command-Line Reference
example,
easm218x -legacy cmn.dsp generates cmn.doj resolve_cmn.ldf. easm218x -legacy cmn.dsp resolve1.ldf generates cmn.doj resolve1.ldf.
more information about RESOLVE() command, Linker Utilities Manual ADSP-21xx Family DSPs. (preserve case) switch directs assembler preserve casesensitive mode. Previous versions assembler software upper-cased program symbols default. easm218x assembler preserves case, i.e. case-sensitive. switch combination with -legacy preserve original case program symbols when re-assembling linking legacy (coded previous version assembler language) easm218x-written routines. example, Release assembler processes CALL tion coded your p1.dsp program:
asm21 p1.dsp asm21 p1.dsp Start;
instruc-
produces relocation against START produces relocation against Start
Release assembler re-assembles p1.dsp:
easm218x p1.dsp -legacy -2181 easm218x p1.dsp -legacy -2181 produces relocation against START produces relocation against Start
2-22
default, Release assembler differentiates between lowercase uppercase characters; Release assembler does not.
Assembler Manual ADSP-218x Family DSPs
Assembler
-D|dmacro[=def] (define macro) switch directs assembler define macro. omit optional definition string =def), assembler defines macro value Some examples this switch follows:
-Dinput -Dsamples=10 -Dpoint="Start" defines input defines samples defines point string "Start"
-ESP202 -esp202 -ESP202 -esp202 (the ADSP-ESP202 code) switch directs assembler process instructions unique ADSP-ESP202 processors. (generate debug information) switch directs assembler generate line number symbol information DWARF-2 binary format, allowing debug assembly source files. -h[elp] help switch directs assembler output standard list command-line switches with syntax summary. -i|I directory directory directory (include directory) switch directs assembler append specified directory list directories separated semicolons search path included files. These files are: header files (.h) included with #include command
Assembler Manual ADSP-218x Family DSPs
2-23
Assembler Command-Line Reference
data initialization files (.dat) specified with .VAR directive assembler passes this information preprocessor; preprocessor searches included files following order: current project (.dpj) directory
\include
subdirectory VisualDSP installation directory
specified directory list directories). order list defines order multiple searches.
Current directory your *.dpj project directory, directory assembler program. Usage full pathnames switch command line (omitting disk partition) recommended. example,
easm218x "\bin\inlclude\buffer1.dat"
filename (listing) switch directs assembler generate named listing file. Each listing file shows relationship between your source code instruction opcodes that assembler produces. omit filename, assembler outputs error message. more information about listing files, "Reading Listing File" page 2-13. -legacy -legacy (accept legacy code) switch directs assembler process source programs developed using Release assembler software. This compatibility switch calls additional preprocessing step legacy directives syntax conventions summarized Table page 2-43. preprocessor generates intermediate assembly file (.APP) using name input source program. This temporary file deleted upon successful completion assembly (unless switch used).
2-24
Assembler Manual ADSP-218x Family DSPs
Assembler
Note that legacy assembly automatically uppercases symbols. preserve original case program symbols, -legacy combination. more information about "-c" page 2-22.
need revise source code programs when re-assembling with easm218x. Please review diagnostic error messages issued during assembly Release source program.
information revise Release programs they comply with Release assembler syntax, refer "Assembler Enhancements Legacy Support" page 3-1. (generate make rule only) assembler switch directs preprocessor output rule, which suitable make utility, describing dependencies source file. After preprocessing, assembler stops without assembling source into object file. output, assembly make dependencies list, written stdout standard command-line format:
source_file: dependency_file.ext
where dependency_file.ext assembly source file, header file included with #include preprocessor command, data file. When filename option used with assembler outputs make dependencies list named file. (generate make rule assemble) assembler switch directs preprocessor output rule, which suitable make utility, describing dependencies source file. After preprocessing, assembly source into object file proceeds normally. output,
Assembler Manual ADSP-218x Family DSPs
2-25
Assembler Command-Line Reference
assembly make dependencies list, written stdout standard command-line format:
source_file.doj: dependency_file.ext
where dependency_file.ext assembly source file, header file included with #include preprocessor command, data file. example, source vectAdd.asm includes "MakeDepend.h" inits.dat files. When assembling with
easm21k vectAdd.asm
assembler appends .DOJ extension source file name list dependencies:
vectAdd.doj: MakeDepend.h vectAdd.doj: inits.dat
When filename option used with -MM, assembler outputs make dependencies list stdout. filename (output make rule) assembler switch specifies name make dependencies file, which assembler generates when switch. named file current directory, must provide pathname double quotation marks ("").
name
filename option takes precedence over option.
file-
filename (output make rule named source) assembler switch specifies name source file which assembler generates make rule when switch. named file cur-
2-26
Assembler Manual ADSP-218x Family DSPs
Assembler
rent directory, must provide pathname double quotation marks (""). [filename] (output) switch directs assembler specified filename argument object file. omit switch argument, assembler uses input file name output appends .DOJ extension. also this switch specify filename preprocessed assembly file (.IS) only file that preprocessor outputs when switch selected. Some examples this switch follows:
easm218x test1.is test.asm specify filename preprocessed file easm218x "C:\bin\prog3.doj" prog3.asm specify directory object file
(proceed with preprocessing only) switch directs assembler preprocessor, stop without assembling source into object file. default, preprocessor generates intermediate preprocessed assembly file using name source program attaching extension When assembling with switch, file final result assembly. (remove preprocessor output) switch directs assembler remove lines that contain preprocessor output information from listing file.
Assembler Manual ADSP-218x Family DSPs
2-27
Assembler Command-Line Reference
(skip preprocessing) switch directs assembler assemble source file into object file without running preprocessor. When assembly skips preprocessing entirely (the switch), preprocessed assembly file (.IS) created. -v[erbose] -verbose (verbose) switch directs assembler display both version command-line information each phase assembly. -version -version (display version) switch directs assembler display version information assembler preprocessor programs. (disable warnings) switch directs assembler display warning messages generated during assembly.
2-28
Assembler Manual ADSP-218x Family DSPs
Assembler
Assembler Syntax Reference
When develop source program assembly language, include preprocessor commands assembler directives control program's processing assembly. must follow assembler rules conventions syntax define symbols (identifiers), expressions, different numeric comment formats. Software developers write assembly programs should familiar with following topics: "Assembler Keywords Symbols" page 2-29 "Assembler Expressions" page 2-34 "Assembler Operators" page 2-35 "Numeric Formats" page 2-38 "Comment Conventions" page 2-40 "Assembler Directives" page 2-41
Assembler Keywords Symbols
assembler supports predefined keywords that includes register bitfield names, assembly instructions, assembler directives. Listing page 2-30 lists assembler keywords.
Assembler Manual ADSP-218x Family DSPs
2-29
Assembler Syntax Reference
_ADI_ Listing _DATE_ _FILE_ _LINE_ _STDC_ _TIME_
2-1.
CODE CODE CONST DATA DEFINE DIVQ DIVS DMBSS DMPG1 DMPG2 DMSEG E_MODE ELIF ELSE EMUIDLE END_REPEAT ENDIF ENDMACRO ENDMOD ENTRY ERROR ETRAP EXPADJ EXPORT EXTERN EXTERNAL FILE FLAG_OUT FLUSH FOREVER GENLABEL GLOBAL
ICNTL IDLE IFDEF IFNDEF IJPG IMASK INCLUDE INDENT INIT INIT24 IOPG IRPTL JUMP KTRAP LCALL LEFTMARGIN LENGTH LJUMP LOCAL LOOP LPSTACKA
LPSTACKP LSHIFT M_MODE MACRO MODIFY MODULE MSTAT NEWPAGE NONE NORM OFFSETOF OWRCNTR PAGE PAGEID PAGELENGTH PAGEWIDTH PASS
ADDRESS ALIGN AR_SAT ASHIFT ASM_ASSERT ASTAT AV_LATCH BIT_REV BOOT BYTE CACHE CACTL CALL CCODE CIRC CLRBIT CLRINT CNTR
2-30
Assembler Manual ADSP-218x Family DSPs
Assembler
PMBSS PMCODE PMDAT PMSEG PORT PRAGMA PRECISION PREVIOUS PUSH REPEAT RESET ROUND_MINUS ROUND_NEAREST ROUND_PLUS ROUND_ZERO
iListng TGLBIT Listing 2-1. easm218x Assembler Keywords SEC_DAG TIMER SEC_REG TOGGLE SECTION Although TRAP keywords this listing appear uppercase, TRUE case insensitive assembler's syntax. keywords TSTBIT example, assembler does differentiate between "DM" SETBIT SETINT "dm". SHT_DEBUGINFO TYPE SHT_DM SHT_DYNAMIC UNDEFINE SHT_DYNSYM UNTIL SHT_HASH SHT_LDF SHT_NOBITS SHT_NOTE SHT_NULL WARNING SHT_PMCODE SHT_PMDATA SHT_PROCESSORTYP
Linst
SHT_REL SHT_RELA SHT_SEGMENINF SHT_SHLIB SHT_STRTAB SHT_SYMTAB SIMIDLE SIZE SSTAT STACKA STACKP STATIC STEP STT_FUNC STT_OBJECT SWCOND SYSCTL
SEC_DAG SEC_REG SECTION SETBIT SETINT SHT_DEBUGI SHT_DM SHT_DYNAMIC SHT_DYNSYM SHT_HASH SHT_LDF SHT_NOBITS SHT_NOTE SHT_NULL SHT_PMCODE
SWCOND SYSCTL TGLBIT TIMER TOGGLE TRAP TRUE TSTBIT TYPE UNDEFINE UNTIL WARNING
Assembler Manual ADSP-218x Family DSPs
2-31
Assembler Syntax Reference
extend this keywords with symbols that declare sections, variables, constants, address labels. When defining symbols assembly source code, follow these conventions: Define symbols that unique within file which they declared. symbol more than file, .GLOBAL directive export symbol from file which defined. Then .EXTERN directive import symbol into other files. Begin symbols with alphabetic characters.
Symbols alphabetic characters (A-Z a-z), digits special characters (dollar sign underscore).
Symbols case-sensitive, input_addr INPUT_ADDR define unique variables. first character symbol considered reserved assembler. reserved keyword define symbol. ADSP-218x family DSPs assembler's reserved keywords shown Listing 2-1. Match source sections' symbols. Ensure that .SECTIONs' name symbols conflict with linker's keywords Linker Description File (.LDF). linker uses sections' name symbols place code memory. more details, Linker Utilities Manual ADSP-21xx Family DSPs. Ensure that .SECTIONs' name symbols begin with `.rel.' string reserved assembler form relocatable sections.
2-32
Assembler Manual ADSP-218x Family DSPs
Assembler
colon terminate address label symbols. Address label symbols appear beginning instruction line stand alone preceding line. following disassociated lines code demonstrate some symbol usage:
.VAR xoperand; xoperand 16-bit variable .VAR/INIT24 input_array[10]; input_array 24-bit wide data buffer sub_routine_1: sub_routine_1 label .SECTION/PM kernel; kernel section
Assembler Manual ADSP-218x Family DSPs
2-33
Assembler Syntax Reference
Assembler Expressions
assembler evaluate simple expressions source code. assembler supports types expressions: Constant expressions constant expression acceptable wherever numeric value expected assembly instruction preprocessor command syntax. Constant expressions contain arithmetic logical operation more numeric constants, including constants fractional type:
2.9e-5 1.29 (128 0x55 0x0f 7.6r
information about fraction type support, refer "Numeric Formats" page 2-38. Address expressions Address expressions contain symbol integer constant:
data data_buffer strtup
Symbols this type expression data variables, data buffers, program labels. Adding subtracting integer from symbol specifies offset from address symbol represents.
2-34
Assembler Manual ADSP-218x Family DSPs
Assembler
Assembler Operators
Table lists assembler's numeric bitwise operators used constant expressions address expressions. These operators listed order they processed while assembler evaluates your expressions. Note that assembler limits operators address expressions addition subtraction. Table 2-4. Operator Precedence Chart
Operator (expression) Usage Description expression parenthesis evaluates first. Ones complement. Unary minus. Multiply. Divide. replaced previous release. Modulus. Addition. Subtraction. Shift left. Shift right. Less than. Less than equal. Greater than. Greater than equal. Equal. equal.
Assembler Manual ADSP-218x Family DSPs
2-35
Assembler Syntax Reference
Table 2-4. Operator Precedence Chart (Cont'd)
Operator Usage Description Bitwise AND. Bitwise inclusive Bitwise exclusive Logical AND. Logical
assembler also supports special "address of", "length of", "page operators. Table lists describes these operators used constant address expressions. Table 2-5. Special Assembler Operators
Operator ADDRESS(symbol) symbol LENGTH(symbol) PAGE(symbol) Usage Description Least significant address bits symbol. Address pointer symbol. Length symbol words. Most significant address bits associated with symbol.
"address of", "length of", "page operators used with external symbols apply these special operators symbols that defined other sections .GLOBAL symbols.
2-36
Assembler Manual ADSP-218x Family DSPs
Assembler
following example demonstrate assembler operators used load (length) (index) registers when setting circular buffers:
.SECTION/DATA data1; .VAR real_data[n]; .SECTION/CODE program; I5=real_data; L5=length(real_data); AR=I5; REG(B5)=AR; M4=1; CNTR=DO loop1 UNTIL AX0=DM(I5,M4); loop1: data section n=number input samples
code section buffer's base address buffer's length load address data register post-modify next sample
This code fragment initializes base address length, respectively, circular buffer real_data. buffer length value contained determines when addressing wraps around buffer. further information circular buffers, refer your User's Manual.
Assembler Manual ADSP-218x Family DSPs
2-37
Assembler Syntax Reference
Numeric Formats
assembler supports binary, decimal, hexadecimal, fractional numeric formats (bases) within expressions assembly instructions. Table describes conventions notation assembler uses distinguish between numeric formats. Table 2-6. Numeric Formats
Convention 0xnumber B#number b#number number numberr Description "0x" prefix indicates hexadecimal number. "B#" "b#" prefix indicates binary number.
prefix indicates decimal number. suffix indicates fractional number.
Fractional Type Support Fractional (fract) constants specially marked floating-point constants represented fixed-point. fract constant uses floating-point representation with trailing "r", where stands "fract". legal range [-1.1). Fracts represented signed values, which means values must greater than equal less than Example:
.VAR myFracts[] 0.5r, -0.5e-4r, -0.25e-3r, 0.875r; constants examples legal fracts .VAR OutOfRangeFract 1.5r; [Error E37] .Fract constant '1.5r' range. Fract constants must greater than equal less than
2-38
Assembler Manual ADSP-218x Family DSPs
Assembler
1.15 Fracts Fracts 1.15 ADSP-21xx family, meaning sign bits fraction". This +1-2**15. example, 1.15 maps constant 0.5r 2**14. conversion formula used ADSP-21xx convert from floating-point fixed-point uses scale factor
fractValue (short) (doubleValue 15))
Example:
Fract output 0.5r 0x4000 sign bits 0100 0000 0000 0000 0x4000 .var myFract .5r; Fract output -1.0r 0x8000 sign bits 1000 0000 0000 0000 0x8000 -1.0r .var myFract -1.0r;
1.0r Special Case fract range. Specify 0x7FFF closest approximation 1.0r within 1.15 representation.
1.0r
Fractional Arithmetic assembler supports arithmetic operations fractional constants. implemented, constant fract expressions consistent with what provided other numeric types assembler. Doing fract constant arithmetic sometimes necessary when receives constants wants derive others from them.
Assembler Manual ADSP-218x Family DSPs
2-39
Assembler Syntax Reference
internal (intermediate) representation expression evaluation double floating-point value. Fract range checking deferred until expression evaluated.
#define fromSomewhereElse .section/dm data1; .var localOne fromSomewhereElse 0.005r; .var 1.5r .9r; Result within legal range .var 1.5r; Error 1.5r range 0.875r
Mixed Type Arithmetic assembler implementation currently supports arithmetic between fracts, fracts integers.
.var myFract 0.5r; [Error .Assembler Error: Illegal mixing types expression.
Comment Conventions
assembler supports C++-style formats inserting comments assembly source code. Table lists describes these formats. Table 2-7. Comment Conventions
Convention comment comment Description string encloses multiple-line comment. pair slashes "//" denote single-line comment.
2-40
easm218x
assembler does allow nested comments.
Assembler Manual ADSP-218x Family DSPs
Assembler
Assembler Directives
Directives assembly source file control assembly process. Unlike instructions, directives produce opcodes during assembly. following general syntax assembler directives:
.directive [/qualifiers |arguments];
Each assembler directive starts with period ends with semicolon Some directives take qualifiers arguments. directive's qualifier immediately follows directive separated slash (/); arguments follow qualifiers. Comments follow directive's terminating semicolon. Assembler directives uppercase lowercase. Using uppercase distinguishes directives from other symbols your source code. ADSP-218x assembler supports directives shown Table page 2-42. description each directive appears following sections. ADSP-218x assembler also supports Release directives shown Table page 2-43. re-assemble program that uses directives listed Table with easm218x, -legacy switch. more information about legacy directives syntax conventions, "Assembler Enhancements Legacy Support" page 3-1. releases Futuredirectivesoforthe development tools support legacy conventions syntax. strongly recommend revise source programs developed under Release 6.1.
Assembler Manual ADSP-218x Family DSPs
2-41
Assembler Syntax Reference
Table 2-8. Assembler Directives
Directive .ALIGN (see page 2-44) .EXTERN (see page 2-45) .FILE (see page 2-46) Description Specifies byte alignment requirement. Allows reference global symbol. Overrides filename given command line. Used compiler. Changes symbol's scope from local global. Defines width left margin listing. Inserts page break listing. Defines length listing. Defines width listing. Reverts previously described .SECTION. Marks beginning section. Calculates size function. Changes default data type symbol. Used compiler. Defines initializes data objects. Defines initializes 24-bit wide data objects.
.GLOBAL (see page 2-47) .LEFTMARGIN (see page 2-48) .NEWPAGE (see page 2-49) .PAGELENGTH (see page 2-50) .PAGEWIDTH (see page 2-51) .PREVIOUS (see page 2-52) .SECTION (see page 2-53) .SIZE (see page 2-55) .TYPE (see page 2-56)
.VAR (see page 2-57) .VAR/INIT24 (see page 2-60)
2-42
Assembler Manual ADSP-218x Family DSPs
Assembler
Table 2-9. Release Legacy Directives
Legacy Directive (Release 6.1) .CONST (see page 3-8) .DMSEG (see page 3-9) .ENTRY (see page 3-11) .EXTERNAL (see page 3-12) .INCLUDE (see page 3-13) .INDENT (see page 3-15) .INIT (see page 3-16) .INIT24 (see page 3-16) .INIT ASCII8 (see page 3-18) .LOCAL (see page 3-19) .MACRO/.ENDMACRO (see page 3-21) .MODULE/.ENDMOD (see page 3-23) .PAGE (see page 3-26) .PMSEG (see page 3-9) .PORT (see page 3-27) .VAR/ABS (see page 3-28) .VAR/CIRC (see page 3-28 Replaced with (Release 7.0) #define (see page 4-19) .SECTION/DM /DATA (see page 2-53) .GLOBAL (see page 2-47) .EXTERN (see page 2-45) #include (see page 4-28) Removed .VAR (see page 2-57) .VAR/INIT24 (see page 2-57) .VAR (see page 2-57) (see page 4-32) #define (see page 4-19) .SECTION/PM /CODE (see page 2-53) Removed .SECTION/PM /CODE (see page 2-53) .VAR (see page 2-57) .GLOBAL (see page 2-47) RESOLVE() (see page 2-21) .VAR/CIRC
(see page 3-28)
Assembler Manual ADSP-218x Family DSPs
2-43
Assembler Syntax Reference
.ALIGN, Specify Address Alignment .ALIGN directive forces address alignment instruction data item within .SECTION used. .ALIGN directive uses following syntax:
.ALIGN expression;
Where: evaluates integer. expression specifies byte alignment requirement; value must power When aligning data item instruction, assembler adjusts address current location counter next address evenly divided value expression, aligned. expression signifies address alignment requirement.
expression .ALIGN
theisabsence1.of ment
Example:
directive, default address align-
.ALIGN alignment requirement .ALIGN alignment requirement .SECTION/DM data1; ALIGN .VAR single; aligns data item word boundary, location with address value that evenly divided .ALIGN .VAR samples1[100]="data1.dat"; aligns first data item doubleword boundary, location with address value that evenly divided advances other data items consequently
2-44
Assembler Manual ADSP-218x Family DSPs
Assembler
.EXTERN, Refer Globally Available Symbol .EXTERN directive imports symbols that have been declared .GLOBAL other files. more information .GLOBAL directive, page 2-47. .EXTERN directive uses following syntax:
.EXTERN symbolName1[, symbolName2,
Where:
symbolName
name global symbol import. single
.EXTERN directive reference number separated commas
symbols line. Example:
.EXTERN coeffs; This code declares external symbol reference global symbol declared example code .GLOBAL directive description (page 2-47).
Assembler Manual ADSP-218x Family DSPs
2-45
Assembler Syntax Reference
.FILE, Override Name Object File .FILE directive overrides name object file specified with filename command-line switch. This directive appear compiler-generated assembly source file (.S). .FILE directive used ensure that debugger correct file name symbol table. This directive added connection with overlay linking enable overriding filename given command line. This directive uses following syntax:
.FILE "filename.ext";
Where:
filename
name assembler applies object file. argument enclosed double quotes.
Example:
.FILE "vect.c"; argument file .SECTION/DM data1;
2-46
Assembler Manual ADSP-218x Family DSPs
Assembler
.GLOBAL, Make Symbol Globally Available .GLOBAL directive changes scope symbol from local global, making symbol available reference object files that linked with current one. default, symbol valid only file which declared. Local symbols different files have same name, assembler considers them independent entities. Global symbols recognizable other files refer same address value. change scope symbol with .GLOBAL directive. Once symbol declared global, other files refer with .EXTERN. more information .EXTERN directive, page 2-45. .GLOBAL directive uses following syntax:
.GLOBAL symbolName1[, symbolName2,.];
Where: name global symbol. single .GLOBAL directive define global scope number symbols, separated commas, line.
symbolName
Example:
.VAR coeffs[10]; .VAR taps=100; .GLOBAL coeffs, taps; declares buffer declares variable makes buffer variable visible other files
Assembler Manual ADSP-218x Family DSPs
2-47
Assembler Syntax Reference
.LEFTMARGIN, Margin Width Listing File .LEFTMARGIN directive sets margin width listing page. specifies number empty spaces left margin listing file (.LST), which assembler produces when switch. absence .LEFTMARGIN directive, printer advances empty spaces left margin. .LEFTMARGIN directive uses following syntax:
.LEFTMARGIN expression;
Where: evaluates integer from expression value cannot exceed maximum number columns printed page. change default setting entire listing, place .LEFTMARGIN directive beginning your assembly source file.
expression
Example:
.LEFTMARGIN listing line begins column
margin width only once perofsource file. assembler encounters multiple occurrences
directive, ignores them except last.
.LEFTMARGIN
2-48
Assembler Manual ADSP-218x Family DSPs
Assembler
.NEWPAGE, Insert Page Break Listing File .NEWPAGE directive inserts page break printed listing file (.LST which assembler produces when switch. assembler inserts page break location .NEWPAGE directive. .NEWPAGE directive uses following syntax:
.NEWPAGE;
This directive appear anywhere your source file. absence .NEWPAGE directive, page ejected after listing lines.
Assembler Manual ADSP-218x Family DSPs
2-49
Assembler Syntax Reference
.PAGELENGTH, Page Length Listing File .PAGELENGTH directive controls page length listing file (.LST), which assembler produces when switch. .PAGELENGTH directive uses following syntax:
.PAGELENGTH expression;
Where: evaluates integer from specifies number text lines printed page. absence .PAGELENGTH directive, listing file prints lines page. format entire listing, place .PAGELENGTH directive beginning your assembly source file.
expression
Example:
.PAGELENGTH starts page after printing lines
page length only once source file. assembler encounters multiple occurrences
directive, ignores them except last.
.PAGELENGTH
2-50
Assembler Manual ADSP-218x Family DSPs
Assembler
.PAGEWIDTH, Page Width Listing File .PAGEWIDTH directive sets page width listing file (.LST), which assembler produces when switch. .PAGEWIDTH directive uses following syntax:
.PAGEWIDTH expression;
Where: evaluates integer from specifies maximum number characters printed output. absence .PAGEWIDTH directive, line begins after characters printed preceding line. change default number characters line entire listing, place .PAGEWIDTH directive beginning assembly source file.
expression
Example:
.PAGEWIDTH starts line after characters printed line
once page width onlyoccurrencessource file. assembler encounters multiple directive, ignores them except last.
.PAGEWIDTH
Assembler Manual ADSP-218x Family DSPs
2-51
Assembler Syntax Reference
.PREVIOUS, Revert Previously Defined Section .PREVIOUS directive instructs assembler current section program memory data memory section that been described directly before current one. This directive uses following syntax:
.PREVIOUS;
Example:
.SECTION/PM sec_one; data instructions .SECTION/DM sec_two; data .PREVIOUS; data instructions
directs assembler revert back sec_one same effect
.SECTION/PM sec_one; data instructions .SECTION/DM sec_two; data .SECTION/PM sec_one; data instructions
2-52
Assembler Manual ADSP-218x Family DSPs
Assembler
.SECTION, Declare Memory Section .SECTION directive marks beginning program memory section data memory section, which array contiguous locations your target program memory data memory. Statements between .SECTION following .SECTION directive end-of-file comprise contents section. This directive uses following syntax:
.SECTION/type sectionName [sectionType];
Where: /type keyword maps section into memory. This mapping should follow from chip's memory architecture. type must match memory type input section same name used Linker Description File place section. following types required each .SECTION directive: Table 2-10. Memory Section Types
Memory/Section Type CODE DATA Description Memory that contains instructions possibly data. Memory that contains data. Random access memory. Read only memory.
section name symbol, sectionName, limited length case-sensitive. Section names must match corresponding input section names used Linker Description File place
Assembler Manual ADSP-218x Family DSPs
2-53
Assembler Syntax Reference
section. take advantage default Linker Description File included \218x\ldf VisualDSP installation directory, write your LDF. assembler generates relocatable sections linker fill addresses symbols link time. ADSP-21xx assembler implicitly pre-fix name section with `.rel.' string form relocatable section. example, sections named rel.seg_dmda rel.seg_pmco, relocation section .rel.rel.seg_dmda .rel.rel.seg_pmco respectively. avoid such ambiguity, ensure that your sections' names begin with `.rel.'. sectionType parameter optional currently reserved, assigning type section. Valid types described ELF.h header file, which available from third-party companies. more information file format, Linker Utilities Manual ADSP-21xx Family DSPs. Example:
Declared below data program sections correspond default LDF's input sections. .SECTION/DM data1; .SECTION/CODE program; data memory section program memory section
select invalid qualifier disregard entirely, assembler exits with error message.
2-54
Assembler Manual ADSP-218x Family DSPs
Assembler
.SIZE, Calculate Size Function .SIZE directive directs assembler mark boundaries function, thus allowing size calculation. .SIZE directive appear compiler-generated assembly source code statement following last instruction function. This directive uses following syntax:
.SIZE(functionSymbol, .-functionLabel);
Where:
functionSymbol .-functionLabel tionLabel's
name function.
assembler generated label. Note that funcpreceding character (.-) allowed this syntax only.
assembler creates relocations each .SIZE directive beginning closing labels. linker resolves .SIZE directive link time; this provides correct size calculations assembly functions that change their size link time. Example:
start: NOP; NOP; NOP; .SIZE(start, .-start);
Assembler Manual ADSP-218x Family DSPs
2-55
Assembler Syntax Reference
.TYPE, Change Default Symbol Type .TYPE directive enables compiler change default symbol type object. This directive appear compiler-generated assembly source file (.S). This directive uses following syntax:
.TYPE symbolName, symbolType;
Where: name object, which symbol type compiler changed.
symbolName
symbol type STT_*. valid symbol types listed ELF.h header file. default, label code section STT_FUNC symbol type label data section STT_OBJECT symbol type.
symbolType
2-56
Assembler Manual ADSP-218x Family DSPs
Assembler
.VAR, Declare Data Variable Buffer .VAR directive declares optionally initializes variables data buffers. variable uses single memory location, data buffer uses array memory locations. When declaring initializing variables, aware following: .VAR directive valid only appears within section. assembler associates variable with memory type section which .VAR appears. single .VAR directive declare number variables buffers, separated commas, line. Unless absolute placement variable specified with RESOLVE() command, Release linker places variables consecutive memory locations. example, .VAR x,y,z[50]; sequentially places symbols elements buffer memory,
.VAR .VAR .VAR z[50];
linker previous release places multiple variables consecutive memory locations only they were declared same line. Referring variables buffers code before declaring them, leads syntax errors. Initialized variables program memory data memory 16-bit variables default. .VAR directive list initial values directive statement read them from external .dat file.
Assembler Manual ADSP-218x Family DSPs
2-57
Assembler Syntax Reference
number initial values exceed number variables buffer locations that declare. .VAR directive declare implicit-size buffer. number initialization elements defines length implicit-size buffer. The.VAR directive takes following forms:
.VAR varName1[,varName2,.]; .VAR varName1,varName2,. initExpression1, initExpression2,.; .VAR bufferName[] initExpression1, initExpression2,.; .VAR bufferName[] "fileName"; .VAR bufferName[length] "fileName"; .VAR bufferName1[length] bufferName2[length],.];* .VAR bufferName[length] initExpression1, initExpression2,.;
Where: user-defined varName bufferName symbols identify variables buffers. fileName parameter indicates that elements buffer their initial values from fileName data file (.DAT). initialization file current directory your operating system, only filename need given inside brackets. Otherwise, specify directory name initialization file with switch. ellipsis represents comma-delimited list parameters.
brackets that enclose optional [length] required. more information, following .VAR examples.
2-58
Assembler Manual ADSP-218x Family DSPs
Assembler
optional [length] parameter defines length associated buffer words. number initialization elements defines length implicit-size buffer. initExpressions parameters initial values variables buffer elements. following lines code demonstrate some .VAR directives:
.VAR samples[] declare initialize implicit-length buffer .VAR Ins, Outs, Remains; declare three uninitialized variables .VAR samples[100] "inits.dat"; declare 100-location buffer initialize with contents inits.dat file; .VAR taps=100; declare variable initialize variable .VAR twiddles[10] "phase.dat"; declare 10-location buffer load buffer with contents phase.dat file
Initializing from files useful loading buffers with data, such filter coefficients phase rotation factors that generated other programs. assembler determines values stored memory when reads data files. .VAR ASCII String Initialization Support easm218x assembler supports ASCII string initialization. This allows full ASCII character set, including digits, special characters.
Assembler Manual ADSP-218x Family DSPs
2-59
Assembler Syntax Reference
String initialization takes following forms:
.VAR symbolString[length] `initString', .VAR symbolString[] `initString',
Note that number initialization characters defines length string (implicit-size initialization). Example:
.var x[13] `Hello world!', .var `Hello world!',
assembler also accepts ASCII characters within comments. .VAR/CIRC Release assembler supports circular buffer declaration addressing. This accomplished with /CIRC qualifier, .VAR/CIRC. more information about /CIRC qualifier circular buffers, refer ".VAR/CIRC, Declare Circular Buffer" page 3-28. .VAR/INIT24 special case .VAR directive, .VAR/INIT24, allows declaration initialization 24-bits wide data structures program memory sections. The.VAR/INIT24 directive takes following form:
.VAR/INIT24 varName,. initExpression,
Example:
.SECTION/PM program; .VAR/INIT24 myPMdata 0x157001; declare 24-bit variable program memory
2-60
Assembler Manual ADSP-218x Family DSPs
Assembler
Assembler Glossary
Assembler directives tell assembler process your source code some features. Directives structure your program into logical section(s) that mirror memory layout your target system. Instruction assembly instructions that work specific family. assembler supports ADSP-218x instruction set. information 16-bit, fixed-point family DSPs instruction set, following publications: ADSP-2100 Family User's Guide ADSP-2181, ADSP-2183, ADSP-2184/2184L, ADSP-2185/2185L/2185M, ADSP-2186/2186L/2186M, ADSP-2187L, ADSP-2188M, ADSP-2189M, ADSP-ESP202 data sheets Linker Description File controls linker processes assembler's output object files into executable programs. more information, Linker Utilities Manual ADSP-218x Family DSPs. Preprocessor commands directs preprocessor include files, perform macro substitutions, control conditional assembly. more information, "Preprocessor Commands" page 4-17.
Assembler Manual ADSP-218x Family DSPs
2-61
Assembler Glossary
2-62
Assembler Manual ADSP-218x Family DSPs

Other recent searches


SS4984US - SS4984US   SS4984US Datasheet
IDT10484 - IDT10484   IDT10484 Datasheet
IDT100484 - IDT100484   IDT100484 Datasheet
IDT100A484 - IDT100A484   IDT100A484 Datasheet
IDT101484 - IDT101484   IDT101484 Datasheet
IDT101A484 - IDT101A484   IDT101A484 Datasheet
HFCN-1200 - HFCN-1200   HFCN-1200 Datasheet
HER151 - HER151   HER151 Datasheet
HER158 - HER158   HER158 Datasheet
FYP2010DN - FYP2010DN   FYP2010DN Datasheet
CL025G - CL025G   CL025G Datasheet
AP7217 - AP7217   AP7217 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive