<< Chapter < Page Chapter >> Page >
.d unit
Instruction Description
ADD(U) signed or unsigned integer addition without saturation
ADDAB (B/H/W) integer addition using addressing mode
LDB (B/H/W) load from memory with a 15-bit constant offset
MV move from register to register
STB (B/H/W) store to memory with a register offset or 5-bit unsigned constant offset
SUB(U) signed or unsigned integer subtraction without saturation
SUBAB (B/H/W) integer subtraction using addressing mode
ZERO zero a register (pseudo-operation)
.m unit
Instruction Description
MPY (U/US/SU) signed or unsigned integer multiply 16lsb*16lsb
MPYH (U/US/SU) signed or unsigned integer multiply 16msb*16msb
MPYLH signed or unsigned integer multiply 16lsb*16msb
MPYHL signed or unsigned integer multiply 16msb*16lsb
SMPY (HL/LH/H) integer multiply with left shift and saturation

Useful assembler directives

Other than the CPU instruction set, there are special commandsto the assembler that direct the assembler to do various jobs when assembling the code. There are useful assembler directives you can use to let the assembler know various settings, such as .set, .macro, .endm, .ref, .align, .word, .byte .include .

The .set directive defines a symbolic name. For example, you can have

1 count .set 40

The assembler replaces each occurrence of count with 40 .

The .ref directive is used to declare symbolic names defined in another file. It is similar to the extern declaration in C.

The .space directive reserves a memory space with specified number of bytes. For example, you canhave

1 buffer .space 128

to define a buffer of size 128 bytes. The symbol buffer has the address of the first byte reserved by .space . The .bes directive is similar to .space , but the label has the address of the last byte reserved.

To put a constant value in the memory, you can use .byte , .word , etc. If you have

1 const1 .word 0x1234

the assembler places the word constant 0x1234 at a memory location and const1 has the address of the memory location. .byte etc. works similarly.

Sometimes you need to place your data or code at specific memory address boundaries such as word, halfword, etc. You can use the .align directive to do this. For example, if you have

1 .align 4 2 buffer .space 1283 ...

the first address of the reserved 128 bytes is at the word boundary in memory, that is the 2 LSBs of the address (inbinary) are 0. Similarly, for half-word alignment, you should have .align directive to do this. For example, if you have

1 .align 2 2 buffer .space 1283 ...

the .include directive is used to read the source lines from another file. The instruction

1 .include ``other.asm''

will input the lines in other.asm at this location. This is useful when working with multiple files.Instead of making a project having multiple files, you can simply include these different files in one file.

How do you write comments in your assembly program? Anything that follows ; is considered a comment and ignored by the assembler. For example,

Questions & Answers

List and explain four factors of production
Vuyo Reply
capital labour entrepreneur natural resources
Thembi
What is supply
Ogodo Reply
when the supply decreases demand also decreases
Thembi
types of demand and the explanation
akin Reply
what is demand
akin Reply
other things remaining same if demend is increases supply is also decrease and if demend is decrease supply is also increases is called the demand
Mian
if the demand increase supply also increases
Thembi
you are wrong this is the law of demand and not the definition
Tarasum
Demand is the willingness of buy and ability to buy in a specific time period in specific place. Mian you are saying law of demand but not in proper way. you have to keep studying more. because its very basic things in Economics.
Hamza
what is commercialization?
Doris Reply
How to talk loan for bank?
Alfred Reply
what is the meaning of gpa?
Ritisha Reply
Answer: GPA stands for Grade Point Average. It is a standard way of measuring academic achievement in the U.S. Basically, it goes as follows: Each course is given a certain number of "units" or "credits", depending on the content of the course.
Yusuf
what is small and Microbuisenes
tadesse Reply
What is fiscal policy
Dansofo
Who is the funder of Economic
Dansofo
founder , that is Adam Smith
Daniel
what is model
Daniel Reply
The wealth of Nations
Yusuf Reply
the wealth of nations, is it the first?
Umar
Yes very sure it was released in 1759
Yusuf
thank you Yusuf.
Umar
then when did he died?
Umar
17 July 1790 Born: 16 June 1723, Kirkcaldy, United Kingdom Place of death: Panmure House, Edinburgh, United Kingdom
Yusuf
1790
Yusuf
that's my today questions, thank you Yusuf it's bed time see u after.
Umar
what is fiscal policy
kemigisha Reply
what's mode?
Umar Reply
mode is the highest occurring frequency in a distribution
Bola
mode is the most commonly occurring item in a set of data.
Umar
Please, what is the difference between monopoly and monopsony?
Olaleye Reply
is there monopsony word?
Umar
I have no idea though
Umar
please, in which year Adam smith was born?
Umar
monopsony is when there's only one buyer while monopoly is when there's only one producer.
Bola
who have idea on Banter
Ibrahim
like trade by barter?
Bola
Monopoly is when there's excessively one seller and there is no entry in the market while monopsony is when there is one buyer
kemigisha
Adam smith was born in 1723
Bola
 (uncountable) Good humoured, playful, typically spontaneous conversation. verb (intransitive) To engage in banter or playful conversation. (intransitive) To play or do something amusing. (transitive) To tease mildly.
Umar
which book Adam smith published first? the first book of Adam smith pls.
Umar
wealth on nation, 1776
Daniel
what is market power and how can it affect an economy?
Gab Reply
market power:- where a firm is said to be a price setter.market power benefits the powerful at the expense of others.
Umar
Market power refers to the ability of a firm (or group of firms) to raise and maintain price above the level that would prevail under competition is referred to as market or monopoly power. The exercise of market power leads to reduced output and loss of economic welfare
Kartheek
find information about the national budget
Molahlegi
three branches of economics in which tourism is likely to figure
Makgotso Reply
What are those three branches?
IlRegno
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!





Source:  OpenStax, Dsp lab with ti c6x dsp and c6713 dsk. OpenStax CNX. Feb 18, 2013 Download for free at http://cnx.org/content/col11264/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Dsp lab with ti c6x dsp and c6713 dsk' conversation and receive update notifications?

Ask