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. easm219x.exe ass


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



ASSEMBLER
Figure 2-0. Table 2-0. Listing 2-0. Listing 2-0.
easm219x.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-219x family DSPs.
assembler section .SECTION) declaration referred here corresponds linker input section.
Assembler Manual ADSP-219x Family DSPs
chapter contains following information about assembler: "Assembler Guide" page "Command-Line Reference" page 2-21 "Assembler Syntax Reference" page 2-30 "Assembler Glossary" page 2-64
Assembler Manual ADSP-219x Family DSPs
Assembler
Assembler Guide
guide section describes process developing programs ADSP-219x 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-219x 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-219x 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-219x 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-219x Family DSPs
Assembler
Example:
.SECTION/DM data1; .VAR sqrt_coeff[2] 0x5D1D, 0xA9ED;
complete description directive ADSP-219x assembler, "Assembler Directives" page 2-42. 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, chapter. 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 addresses DSP. Each .SECTION name corresponds input sec-
Assembler Manual ADSP-219x Family DSPs
Assembler Guide
tion 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-219x 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-219x 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-9). LDF's SECTIONS{} command defines .SECTIONs placements ADSP-219x system's physical memory defined linker's Memory{}command.
2-10
Assembler Manual ADSP-219x Family DSPs
Assembler
ARCHITECTURE(ADSP-219x) SEARCH_DIR( $ADI_DSP\219x\lib //Libraries from command line included COMMAND_LINE_OBJECTS $OBJECTS $COMMAND_LINE_OBJECTS; MEMORY seg_rth kernel seg_1 int_dm1 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
{TYPE(PM {TYPE(PM {TYPE(PM {TYPE(DM
RAM) RAM) ROM) RAM)
START(0x00000000) END(0x000000ff) WIDTH(24)} START(0x000100) END(0x00fff) WIDTH(24)} START(0x001100) END(0x040ff) WIDTH(24)} START(0x08000) END(0x087cf) WIDTH(16)}
int_dm3 {TYPE(DM RAM) START(0x09000) END(0x0c000) WIDTH(16)}
Assembler Manual ADSP-219x 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, Compiler Library Manual ADSP-219x Family DSPs. 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-219x compiler located Compiler Library Manual
2-12
Assembler Manual ADSP-219x Family DSPs
Assembler
ADSP-219x 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-16 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 Commands" page 4-17.
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-219x 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, assembler's command line switches. more information these switches, "Assembler Command-Line Interface" page 2-16. Within VisualDSP environment, assembler's options VisualDSP Integrated Development Environment (IDE). more information these option settings, VisualDSP User's Guide ADSP-219x Family DSPs.
2-14
Assembler Manual ADSP-219x Family DSPs
Assembler
Assembler Command-Line Reference
ADSP-219x 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-30 This section describes assembler's predefined keywords provides rules user-defined symbols.
Assembler Manual ADSP-219x Family DSPs
2-15
Assembler Command-Line Reference
"Assembler Expressions" page 2-35 This section describes assembler's numeric relational operators other conventions syntax. "Assembler Directives" page 2-42 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:
easm219x [-switch1 [-switch2 [sourceFile]
Where: Name assembler program ADSP-219x family DSPs.
easm219x
2-16
Assembler Manual ADSP-219x 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-219x 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:
easm219x -2192-12 p1List.lst -Dmax=100 bin\p1.doj p1.asm
runs assembler with:
-219x
Assembles instructions unique ADSP-219x DSPs. Directs assembler output listing file.
p1List.lst -Dmax=100
Defines macro equal 100.
2-18
Assembler Manual ADSP-219x 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:
easm219x -legacy test.doj program2.dsp
runs assembler with:
-legacy
Processes source code developed under Release 6.1.
Preserves case-sensitivity assembly symbols. Renames assembled object file. Specifies source file Release.
test.doj program2.dsp
Command-Line Options This section describes easm219x 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. easm219x Command-Line Switches
Switch Name -219[x|X] Usage Description Assembles instructions suitable chip ADSP-219x Family DSPs. This switch required assembler. -2192-12 Assembles instructions unique ADSP-2192 processors. Writes RESOVLE() commands absolute placement specified .ldf header file.
filename
Assembler Manual ADSP-219x Family DSPs
2-19
Assembler Command-Line Reference
Table 2-3. easm219x Command-Line Switches (Cont'd)
Switch Name -D|dmacro[=definition] -h[elp] -i|I directory -jcs2l filename -legacy filename Usage Description Defines macro. Generates debug information (DWARF-2 format). Outputs list assembler switches. Searches directory included files. Expands short JUMP CALL instructions long. 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.
filename filename -v[erbose] -version
2-20
Assembler Manual ADSP-219x 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. -219[x|X] -219x (the ADSP-219x code) switch directs assembler process instructions unique ADSP-219x processors. -2192-12 -2192 (the ADSP-2192 code) switch directs assembler process instructions unique ADSP-2192 processors. 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-219x 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. easm219x 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) easm219x-written routines. example, Release assembler processes CALL coded your p1.dsp program:
asm21 p1.dsp asm21 p1.dsp Start;
instruction
produces relocation against START produces relocation against Start
Release assembler re-assembles p1.dsp:
easm219x p1.dsp -legacy -219x easm219x p1.dsp -legacy -219x 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-219x 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"
(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 data initialization files (.dat) specified with .VAR directive assembler passes this information preprocessor; preprocessor searches included files following order: current project (.dpj) directory
Assembler Manual ADSP-219x Family DSPs
2-23
Assembler Command-Line Reference
\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,
easm219x "\bin\inlclude\buffer1.dat"
-JumpCallShort2Long -JumpCallShort2Long -jcs2l (expand short instruction long) directs assembler Disable diagnostic messages address offsets JUMP CALL instruction exceeds their range. Directs linker expand out-of-range short JUMP/CALL instruction long LJUMP/LCALL. -verbose switch used, linker issues report provided changes. assembler linker encode jump/call instruction based destination offset. more information linker switch, Linker Utilities Manual ADSP-219x Family DSPs. 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.
2-24
Assembler Manual ADSP-219x Family DSPs
Assembler
-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-44. preprocessor generates intermediate assembly file (.APP) using name input source program. This temporary file deleted upon successful completion assembly (unless switch used). 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 easm219x. Please review diagnostic error messages issued during assembly Release source program.
information revise Release 6.1programs 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.
Assembler Manual ADSP-219x Family DSPs
2-25
Assembler Command-Line Reference
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, 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
2-26
Assembler Manual ADSP-219x Family DSPs
Assembler
switch. named file current directory, must provide pathname double quotation marks ("").
filename option takes precedence over name option.
file-
filename (output make rule named source) assembler switch specifies name source file which assembler generates make rule when switch. named file current 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:
easm219x test1.is test.asm specify filename preprocessed file easm219x "C:\bin\prog3.doj" prog3.asm specify directory object file
Assembler Manual ADSP-219x Family DSPs
2-27
Assembler Command-Line Reference
(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. (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.
2-28
Assembler Manual ADSP-219x Family DSPs
Assembler
(disable warnings) switch directs assembler display warning messages generated during assembly.
Assembler Manual ADSP-219x Family DSPs
2-29
Assembler Syntax Reference
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-30 "Assembler Expressions" page 2-35 "Assembler Operators" page 2-36 "Numeric Formats" page 2-39 "Comment Conventions" page 2-41 "Assembler Directives" page 2-42
Assembler Keywords Symbols
assembler supports predefined keywords that includes register bitfield names, assembly instructions, assembler directives. Listing page 2-32 lists assembler keywords.
2-30
Assembler Manual ADSP-219x Family DSPs
Assembler
_ADI_ _TIME_ ALT_REG ASHIFT BIT_REV BYTE CLEAR CODE DATA DIVS ELIF ENDIF FILE FLAG_IN IDLE IMASK JUMP LENGTH LSHIFT M_MODE NAME
_DATE_
_FILE_
_LINE_
_STDC_
ASTAT
ADDRESS BOOT
AR_SAT
ALIGN AV_LATCH
CACHE CONST DEFINE ELSE ENDMACRO FOREVER FLAG_OUT GLOBAL INCLUDE INTS KTRAP LINE NORM FLAG_IN
CALL CLRBIT
CLRINT
CIRC CNTR
DEFINED DMOVLAY E_MODE ENDMOD EXPADJ FLUSH G_MODE
DMSEG EMUIDLE ENTRY EXPORT
DIVQ ERROR EXTERNEXTERNAL
INDENT
ICNTR IFDEF INIT ISTAT
ICTRL IFNDEF INIT24
LOCAL
LEFTMARGIN LOOP
MODIFY
MACRO MODULE MSTAT NEWPAGE
NONE
Assembler Manual ADSP-219x Family DSPs
2-31
Assembler Syntax Reference
OWRCNTR PAGE PORT PUSH ROUND_ZERO SEGMENT SETINT STATIC TEST TOGGLE UNDEF WAIT
OFFSETOF
PAGEID READ ROUND_MINUS SECTION SHIFT STEP TGLBIT TOPPCSTACK UNTIL
PAGELENGTH PMSEG PRAGMA
PAGEWIDTH PMOVLAY PRECISION
PASS PREVIOUS
REGBANK RESET ROUND_NEAREST TIMER TRAP SETBIT SIMIDLE TRUE
ROUND_PLUS SEG_REG SETDATA SIZE SSTAT TYPE TSTBIT
WARNING
WRITE
Listing 2-1. ADSP-219x Assembler Keywords
listing appear Although keywords thisin assembler'suppercase, keywords case insensitive syntax. example, assembler does differentiate between "DM" "dm".
2-32
Assembler Manual ADSP-219x Family DSPs
Assembler
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-21xxx 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-21xxx Family DSPs. Ensure that .SECTIONs' name symbols begin with `.rel.' string reserved assembler form relocatable sections. colon terminate address label symbols.
Assembler Manual ADSP-219x Family DSPs
2-33
Assembler Syntax Reference
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
2-34
Assembler Manual ADSP-219x Family DSPs
Assembler
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:
2.9e-5 1.29 (128 0x55 0x0f 7.6r
information about fraction type support, refer "Numeric Formats" page 2-39. 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.
Assembler Manual ADSP-219x Family DSPs
2-35
Assembler Syntax Reference
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.
2-36
Assembler Manual ADSP-219x Family DSPs
Assembler
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.
Assembler Manual ADSP-219x Family DSPs
2-37
Assembler Syntax Reference
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 //get 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.
2-38
Assembler Manual ADSP-219x Family DSPs
Assembler
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
Assembler Manual ADSP-219x Family DSPs
2-39
Assembler Syntax Reference
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.
2-40
Assembler Manual ADSP-219x Family DSPs
Assembler
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.
easm219x
assembler does allow nested comments.
Assembler Manual ADSP-219x Family DSPs
2-41
Assembler Syntax Reference
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-219x assembler supports directives shown Table page 2-43. description each directive appears following sections. ADSP-219x assembler also supports Release directives shown Table page 2-44. re-assemble program that uses directives listed Table with easm219x, -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.
2-42
Assembler Manual ADSP-219x Family DSPs
Assembler
Table 2-8. Assembler Directives
Directive .ALIGN (see page 2-45) .EXTERN (see page 2-46) .FILE (see page 2-47) 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. Repeats instruction sequence. 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-49) .NEWPAGE (see page 2-50) .PAGELENGTH (see page 2-51) .PAGEWIDTH (see page 2-52) .PREVIOUS (see page 2-53) .REPEAT() (see page 2-54) .SECTION (see page 2-56) .SIZE (see page 2-58) .TYPE (see page 2-59)
.VAR (see page 2-60) .VAR/INIT24 (see page 2-63)
Assembler Manual ADSP-219x Family DSPs
2-43
Assembler Syntax Reference
Table 2-9. Release Legacy Directives
Release Directive .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) Replaced With Release #define (see page 4-19) .SECTION/DATA (see page 2-56) .GLOBAL (see page 2-46) .EXTERN (see page 2-46) #include (see page 4-28) .LEFTMARGIN (see page 2-49), .PAGELENGTH (see page 2-51), .PAGEWIDTH (see page 2-52) .VAR (see page 2-60) .VAR/INIT24 (see page 2-63) (concatenation) (see page 4-32) #define (see page 4-19) .SECTION/CODE .SECTION/PM (see page 2-56) .SECTION/CODE .SECTION/PM (see page 2-56) .VAR (see page 2-60) .GLOBAL (see page 2-46) RESOLVE() (see page 2-21) Base registers B0-B7
.INIT (see page 3-16) .INIT24 (see page 3-16) .LOCAL (see page 3-19) .MACRO/.ENDMACRO (see page 3-21) .MODULE/.ENDMOD (see page 3-23)
.PMSEG (see page 3-9)
.PORT (see page 3-27) .VAR/ABS (see page 3-27) .VAR/CIRC (see page 3-27)
2-44
Assembler Manual ADSP-219x Family DSPs
Assembler
.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
Assembler Manual ADSP-219x Family DSPs
2-45
Assembler Syntax Reference
.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).
2-46
Assembler Manual ADSP-219x Family DSPs
Assembler
.FILE, Override Name Object File .FILE directive overrides name object file specified with 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.
filename
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;
Assembler Manual ADSP-219x Family DSPs
2-47
Assembler Syntax Reference
.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-46. .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
2-48
Assembler Manual ADSP-219x Family DSPs
Assembler
.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
Assembler Manual ADSP-219x Family DSPs
2-49
Assembler Syntax Reference
.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.
2-50
Assembler Manual ADSP-219x Family DSPs
Assembler
.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
Assembler Manual ADSP-219x Family DSPs
2-51
Assembler Syntax Reference
.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
2-52
Assembler Manual ADSP-219x Family DSPs
Assembler
.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
Assembler Manual ADSP-219x Family DSPs
2-53
Assembler Syntax Reference
.REPEAT()/.END_REPEAT, Repeat Instruction Sequence .REPEAT()/.END_REPEAT directive pair provides automated loop unrolling. .REPEAT() directive marks beginning code block generated assembler specified number times. Statements between .REPEAT() following .END_REPEAT directive comprise contents code block, which single instruction multiple instruction sequence. instruction(s) within REPEAT block inlined assembler. Repeat directives must span section boundaries applicable code sequences only, data. Ensure that each .REPEAT() directive terminating .END_REPEAT; likewise, each closing .END_REPEAT beginning .REPEAT(). Repeat code blocks contain local labels avoid duplication code block with local label. Nested repeat blocks supported. .REPEAT() directive uses following syntax:
.REPEAT(expression); sequence more instructions .END_ REPEAT;
Where: expression evaluates constant assembly time. expression total number times instruction sequence repeats. lowest meaningful number .REPEAT(1);. Example:
following assembler REPEAT directive example: #define n_taps_in_filter CNTR n_samples outer while .REPEAT(n_taps_in_filter); my0;
2-54
Assembler Manual ADSP-219x Family DSPs
Assembler
nop; .END_REPEAT; assemles CNTR n_samples outer while nop; nop; nop; my0; my0; my0;
Assembler Manual ADSP-219x Family DSPs
2-55
Assembler Syntax Reference
.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
2-56
Assembler Manual ADSP-219x Family DSPs
Assembler
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.
Assembler Manual ADSP-219x Family DSPs
2-57
Assembler Syntax Reference
.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
name function.
assembler generated label. Note that functionLabel's preceding 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);
2-58
Assembler Manual ADSP-219x Family DSPs
Assembler
.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
Assembler Manual ADSP-219x Family DSPs
2-59
Assembler Syntax Reference
.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. single .VAR directive declare number variables buffers, separated commas, line. Initialized variables program memory data memory 16-bit variables default.
2-60
Assembler Manual ADSP-219x Family DSPs
Assembler
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.
Assembler Manual ADSP-219x Family DSPs
2-61
Assembler Syntax Reference
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.
2-62
Assembler Manual ADSP-219x Family DSPs
Assembler
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/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: The.VAR/INIT21 directive takes following form:
.VAR/INIT24 varName, initExpression,
Example:
.SECTION/PM program; .VAR/INIT24 myPMdata 0x157001; declare 24-bit variable program memory
Assembler Manual ADSP-219x Family DSPs
2-63
Assembler Glossary
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-219x instruction set. Linker Description File controls linker processes assembler's output object files into executable programs. more information, Linker Utilities Manual ADSP-219x Family DSPs. Preprocessor commands directs preprocessor include files, perform macro substitutions, control conditional assembly. more information, "Preprocessor Commands" page 4-16.
2-64
Assembler Manual ADSP-219x Family DSPs

Other recent searches


Z100FG - Z100FG   Z100FG Datasheet
SDI100S12 - SDI100S12   SDI100S12 Datasheet
SD103AWS - SD103AWS   SD103AWS Datasheet
SD103CWS - SD103CWS   SD103CWS Datasheet
M16C - M16C   M16C Datasheet
IN74AC163 - IN74AC163   IN74AC163 Datasheet
EL-880-17 - EL-880-17   EL-880-17 Datasheet
AN-608-1 - AN-608-1   AN-608-1 Datasheet
AG603-89 - AG603-89   AG603-89 Datasheet
54AC16373 - 54AC16373   54AC16373 Datasheet
74AC16373 - 74AC16373   74AC16373 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive