TMS320C5x DSP STARTER KIT USER'S GUIDE

TMS320C5x DSP STARTER KIT USER'S GUIDE TMS320C5x DSP STARTER KIT USER'S GUIDE

13.07.2015 Views

Directives That Initialize Memory5.5 Directives That Initialize MemoryEach of these directives, with the exception of the .byte and .string directives,aligns the object to a 16-bit word boundary. The .byte directive places one or more 8-bit values into consecutive wordsof the current section. The .word directive places one or more 16-bit values into consecutivewords in the current section. The .string directive places 8-bit characters from one or more characterstrings into the current section. The .long directive places one or more 32-bit values into consecutive32-bit fields in the current section. The .int directive places one or more 16-bit values into consecutive wordsin the current section. The .qxx directive places one or more 16-bit, signed 2s-complement valuesinto consecutive words in the current section. Note that the decimal pointis displaced xx places from the LSB. The .lqxx directive places one or more 32-bit, signed 2s-complement valuesinto consecutive 32-bit fields in the current section. Note that the decimalpoint is displaced xx places from the LSB. The .float directive calculates 32-bit IEEE floating-point representationsof single precision floating-point value and stores it in two consecutivewords in the current section. The .bfloat directive calculates a 16-bit, signed 2s-complement exponentand a 32-bit, signed 2s-complement mantissa. The .efloat directive calculates a 16-bit, signed 2s-complement exponentand a 16-bit, signed 2s-complement mantissa. The .tfloat directive calculates a 32-bit, signed 2s-complement exponentand a 64-bit, signed 2s-complement mantissa. The .double directive calculates a 64-bit IEEE floating-point representationof a double precision floating-point value and stores it in four consecutivewords in the current section.5-8

Directives That Initialize MemoryFigure 5–1. The .space Directive The .space directive reserves a specified number of bits in the currentsection. The assembler advances the SPC and skips the reserved words.When you use a label with .space, it points to the first word of the reservedblock.Figure 5–1 shows an example of the .space directives. Assume the followingcode has been assembled for this example:.ps 0a00h.word 100h, 200hRES_1: .space 30h ;Reserve 48 bits or 3 words.word 15Res_1 points to the first byte in the space reserved by .space.3 wordsreservedRes_1 = 0a02hAssembler Directives5-9

Directives That Initialize Memory5.5 Directives That Initialize MemoryEach of these directives, with the exception of the .byte and .string directives,aligns the object to a 16-bit word boundary. The .byte directive places one or more 8-bit values into consecutive wordsof the current section. The .word directive places one or more 16-bit values into consecutivewords in the current section. The .string directive places 8-bit characters from one or more characterstrings into the current section. The .long directive places one or more 32-bit values into consecutive32-bit fields in the current section. The .int directive places one or more 16-bit values into consecutive wordsin the current section. The .qxx directive places one or more 16-bit, signed 2s-complement valuesinto consecutive words in the current section. Note that the decimal pointis displaced xx places from the LSB. The .lqxx directive places one or more 32-bit, signed 2s-complement valuesinto consecutive 32-bit fields in the current section. Note that the decimalpoint is displaced xx places from the LSB. The .float directive calculates 32-bit IEEE floating-point representationsof single precision floating-point value and stores it in two consecutivewords in the current section. The .bfloat directive calculates a 16-bit, signed 2s-complement exponentand a 32-bit, signed 2s-complement mantissa. The .efloat directive calculates a 16-bit, signed 2s-complement exponentand a 16-bit, signed 2s-complement mantissa. The .tfloat directive calculates a 32-bit, signed 2s-complement exponentand a 64-bit, signed 2s-complement mantissa. The .double directive calculates a 64-bit IEEE floating-point representationof a double precision floating-point value and stores it in four consecutivewords in the current section.5-8

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

Saved successfully!

Ooh no, something went wrong!