13.07.2015 Views

TMS320C5x DSP STARTER KIT USER'S GUIDE

TMS320C5x DSP STARTER KIT USER'S GUIDE

TMS320C5x DSP STARTER KIT USER'S GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using Symbols as Expressions4.4 Using Symbols as ExpressionsUnlike other assemblers, the DSK assembler is not capable of analyzing numericalor logical expressions. However, by removing all of the spaces within a field so thatthe expression is a continuous string, you can set the entire string to a specific value(see Example 4–1).Example 4–1. Analyzing Expressions With the DSK by Using Continuous Strings(a) Expression analysis with a COFF assemblerFFT .set 256LAR AR0, #FFTLACC #FFT –1 ;expression analysis(b) Expression analysis with the DSK assemblerFFT .set 256FFT–1 .set 255 ;set string FFT–1 = 255LAR AR0, #FFTLACC #FFT–1 ;FFT–1 is a complete stringIn Example 4–1 (b) , FFT–1 is a continuous string. The .set directive equates thevalue 256 to the symbol FFT and 255 to the symbol FFT–1; these symbols cannow be used in place of their values. The two opcodes now contain the following:LAR AR0, #256LACC #255Using the DSK Assembler4-9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!