Using the DSK Assembler Directives5.1 Using the DSK Assembler DirectivesTable 5–1. Assembler Directives SummaryTable 5–1 summarizes the assembler directives. Note that all sourcestatements that contain a directive may have a label and a comment. Toimprove readability, they are not shown as part of the directive syntax.(a) Directives that define sectionsMnemonic and Syntax.data.ds [address].entry [address].ps [address].textDescriptionAssemble into data memoryAssemble into data memory (initialize data address)Initialize the starting address of the program counterwhen loading a fileAssemble into program memory (initialize programaddress)Assemble into program memory(b) Directives that reference other filesMnemonic and Syntax.copy [” ]filename[” ].include [“ ]filename[” ]DescriptionInclude source statements from another fileInclude source statements from another file(c) Conditional assembly directivesMnemonic and Syntax.else.endif.if well-defined expressionDescriptionOptional conditional assemblyEnd conditional assemblyBegin conditional assembly5-2
Using the DSK Assembler DirectivesTable 5–1. Assembler Directives Summary (Continued)(a) Directives that initialize constants (data and memory)Mnemonic and Syntax.bfloat value 1 [,..., value n ].byte value 1 [,..., value n ].double value 1 [,..., value n ].efloat value 1 [,..., value n ].float value 1 [,..., value n ].int value 1 [,..., value n ].long value 1 [,..., value n ].lqxx value 1 [,..., value n ].qxx value 1 [,..., value n ].space size in bits.string “string 1 ” [,...,“string n ”].tfloat value 1 [,..., value n ].word value 1 [,..., value n ]DescriptionInitialize a 16-bit, 2s-complement exponent and a32-bit, 2s-complement mantissa—an unpackedfloating-point numberInitialize one or more successive words in the currentsectionInitialize a 64-bit, IEEE double-precision, floatingpointconstantInitialize a 16-bit, 2s-complement exponent and a16-bit, 2s-complement mantissa—a less accurateunpacked floating-point numberInitialize a 32-bit, IEEE single-precision, floatingpointconstantInitialize one or more 16-bit integersInitialize one or more 32-bit integersInitialize a 32-bit, signed 2s-complement integer whosedecimal point is displaced xx places from the LSBInitialize a 16-bit, signed 2s-complement integer whosedecimal point is displaced xx places from the LSBReserve size bits in the current section; note that alabel points to the beginning of the reserved spaceInitialize one or more text stringsInitialize a 32-bit, 2s-complement exponent and a64-bit, 2s-complement mantissa; note that the initializedintegers are in unpacked formInitialize one or more 16-bit integers(b) Miscellaneous directivesMnemonic and Syntax.end.listoff.liston.set.mmregsDescriptionProgram endEnd source listing (overrides the –l assembler option)Restart the source listing (overrides the –l assembleroption)Equate a value with a local symbolEnter memory-map registers into symbol tableAssembler Directives5-3