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.

Creating DSK Assembler Source FilesUsing valid labelsLabels are optional for all assembly language instructions and for most (but notall) assembler directives. When you use them, a label must begin in column 1of a source statement. A label can contain up to 16 alphanumeric characters(A–Z, a–z, 0–9, and _ ). Labels are case sensitive and the first character cannotbe a number. For example:.ps 0a00h ; Your code can start here.entryStart: mar *,AR0lar AR0,#0lacl #03fh ; Turn on all interruptsldp #0 ;IMR located in page 0sacl 4 ;store mask to IMRIn the preceding example, the colon is optional. The DSK assembler does notrequire a label terminator.When you use a label, its value is the current value of the section program counter(the label points to the statement with which it is associated). If, for example, youuse the .word directive to initialize several words, a label would point to the firstword. In the following example, the label Begins has the value 0a00h.00001 –––– –––– *assume other code was assembled00002 –––– ––––00003 –––– 0a00 .ps 0a00h00004 0a00 000a Begins: .word 0Ah,3,70a01 00030a02 0007When a label appears on a line by itself, it points to the instruction on the nextline:00018 –––– fb00 .ds 0fb00h00019 –––– –––– Here:00020 fb00 000a .word 0Ah,3,700021 –––– ––––When an opcode or directive references a label, the label is substituted withthe address of the label’s location in memory. The only exceptions are the .setdirective, which assigns a value to a label, and the LDP opcode, which loadsthe nine most significant bits (MSB) of the address.If you don’t use a label, the first character position must contain a blank, a semicolon,or an asterisk.Using the DSK Assembler4-3

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

Saved successfully!

Ooh no, something went wrong!