<< Chapter < Page Chapter >> Page >

Do not use an asterisk in front of ARx variables here, since this is not indirect addressing.

Examples:

mvmm AR3,AR5 ; sets AR5 = AR3 stm #5,AR2 ; sets AR2 = 5 ldm AR0,A ; sets A = AR0

Immediate addressing: #k3, #k5, k, #k9, #lk

Immediate addressing means that the numerical value of the data is itself provided within the assemblyinstruction. Various TMS320C54x instructions allow immediate data of 3, 5, 8, 9, or 16 bits in length, which are signifiedin the assembly language syntax descriptions with one of the above symbols. The 16-bit form is the most common and issignified by #lk . 16-bit immediate values always require an extra instruction word and therefore take an extramachine cycle to execute.

An immediate data operand is almost always specified in assembler syntax by prepending a pound sign ( # ) to the data. Depending on the context, the assembler mayassume that you meant immediate addressing anyway.

Examples:

ld #0,A ; sets A = 0 cmpm AR1,#1 ; sets flag TC = 1 if AR1 == 1; else TC = 0

Labels make this more complicated. Recall that a label in your assembly code is nothing more than shorthand for thememory address where the labeled code or data is stored. So does an instruction like

stm coef,AR2 ; sets AR2 = memory address of label coef

mean to store the contents of memory location coef in AR2 , or does it mean to store the memory address coef itself in AR2 ? The second interpretation is correct. Because the stm instruction has only one form, expecting a #lk immediate operand, the assembler does not care whether the label is prefixed with a pound signor not. Still, it would have been better for us to include the pound sign in the above example for clarity.

Many instructions have several versions allowing the use of different addressing modes (see ld for a good example of this). With these instructions, including thepound sign is not optional when specifying immediate addressing. The only safe rule, then, is always to prefix thelabel with a pound sign if you wish to specify the memory address of the label and not the contents of that address.

If you are not sure how a particular instruction has been assembled, you can always examine the .lst file produced by the assembler, and compare the hexadecimal opcodeslisted to the left of the assembly instructions with the assembly opcodes given in the assembly language manual(Chapter 4 of the Mnemonic Instruction Set reference).

Direct addressing: smem and others

In the modes called direct addressing by TI, the instruction opcode contains a memory offset (see the "dma"bits on page 5-8 of the CPU and Peripherals reference) seven bits long, which is combined with either the DP (data pointer) or SP (stack pointer) register to obtain a complete 16-bit data-memory address. This divides the data memory intopages of 128 words each.

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Dsp laboratory with ti tms320c54x. OpenStax CNX. Jan 22, 2004 Download for free at http://cnx.org/content/col10078/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Dsp laboratory with ti tms320c54x' conversation and receive update notifications?

Ask