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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

.if/.else/.endifDirectives ReferenceSyntax .if well-defined expression.else.endifDescriptionThree directives provide conditional assembly: The .if directive marks the beginning of a conditional block. The well-definedexpression is a required parameter.If the expression evaluates to true (nonzero), the assemblerassembles the code that follows it (up to an .else or an .endif).If the expression evaluates to false (0), the assembler assemblescode that follows an .else (if present) or an .endif.The .else directive identifies a block of code that the assembler assembleswhen the .if expression is false (0). This directive is optional in theconditional block; if an expression is false and there is no .else statement,the assembler continues with the code that follows the .endif.The .endif directive terminates a conditional block.Nested .if/.else/.endif directives are not valid.ExampleHere are some examples of conditional assembly:yes .set 1no .set 0B0_Dat .set noB1_Dat .set yesIf_1: .if B0_Dat.ds 0100h.endif.if B1_Dat.ds 0300hIf_2: .endifNote:In this instance, the asm option can be particularly useful in turning on the .ifconditional statement from the command line. For example, you could enter:dsk5a test asm”B0_Dat .set 1”5-20

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

Saved successfully!

Ooh no, something went wrong!