MSP430 Assembly Language tools User`s guide.PDF

(1207 KB) Pobierz
SLAU131
MSP430
Assembly Language Tools
User’s Guide
Literature Number: SLAU131A
March 2006
Printed on Recycled Paper
153199095.002.png
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections,
modifications, enhancements, improvements, and other changes to its products and services at any
time and to discontinue any product or service without notice. Customers should obtain the latest
relevant information before placing orders and should verify that such information is current and
complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order
acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale
in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the
extent TI deems necessary to support this warranty. Except where mandated by government
requirements, testing of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are
responsible for their products and applications using TI components. To minimize the risks associated
with customer products and applications, customers should provide adequate design and operating
safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI
patent right, copyright, mask work right, or other TI intellectual property right relating to any
combination, machine, or process in which TI products or services are used. Information published by
TI regarding third-party products or services does not constitute a license from TI to use such products
or services or a warranty or endorsement thereof. Use of such information may require a license from
a third party under the patents or other intellectual property of the third party, or a license from TI under
the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices.
Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not
responsible or liable for such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by
TI for that product or service voids all express and any implied warranties for the associated TI product
or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such
statements.
Following are URLs where you can obtain information on other Texas Instruments products and
application solutions:
Products
Applications
Amplifiers
amplifier.ti.com
Audio
www.ti.com/audio
Data Converters
dataconverter.ti.com
Automotive
www.ti.com/automotive
DSP
dsp.ti.com
Broadband
www.ti.com/broadband
Interface
interface.ti.com
Digital Control
www.ti.com/digitalcontrol
Logic
logic.ti.com
Military
www.ti.com/military
Power Mgmt
power.ti.com
Optical Networking
www.ti.com/opticalnetwork
Microcontrollers
microcontroller.ti.com
Security
www.ti.com/security
Telephony
www.ti.com/telephony
Video & Imaging
www.ti.com/video
Wireless
www.ti.com/wireless
Mailing Address: Texas Instruments
Post Office Box 655303 Dallas, Texas 75265
Copyright
©
2006, Texas Instruments Incorporated
Preface
Read This First
About This Manual
The MSP430 Assembly Language Tools User’s Guide tells you how to use
these assembly language tools:
Assembler
Archiver
Link step
Absolute lister
Cross-reference lister
Hex conversion utility
How to Use This Manual
The goal of this book is to help you learn how to use the Texas Instruments
assembly language tools specifically designed for the MSP430. This book is
divided into four parts:
Introductory information , consisting of Chapters 1 and 2, gives you an
overview of the assembly language development tools. It also discusses
common object file format (COFF), which helps you to use the MSP430
tools more efficiently. Read Chapter 2, Introduction to Common Object File
Format , before using the assembler and link step .
Assembler description , consisting of Chapters 3 through 5, contains
detailed information about using the assembler. This portion explains how
to invoke the assembler and discusses source statement format, valid
constants and expressions, assembler output, assembler directives, and
macros.
iii
153199095.003.png
How to Use This Manual / Notational Conventions
Additional assembly language tools , consisting of Chapters 6 through
11, describes in detail each of the tools provided with the assembler to help
you create executable object files. For example, Chapter 7 explains how
to invoke the link step, how the link step operates, and how to use link step
directives. Chapter 11 explains how to use the hex conversion utility.
Reference material , consisting of Appendixes A through D, provides
supplementary information. This portion contains technical data about the
internal format and structure of COFF object files. It discusses symbolic
debugging directives that the MSP430 C compiler uses. Finally, it includes
hex conversion utility examples and a glossary.
Notational Conventions
This document uses the following conventions:
Program listings, program examples, and interactive displays are shown
in a special typeface similar to a typewriter’s. Examples use a bold
version of the special typeface for emphasis; interactive displays use a
bold version of the special typeface to distinguish commands that you
enter from items that the system displays (such as prompts, command
output, error messages, etc.).
Here is a sample program listing:
1 00000000 2F x .byte 47
2 00000001 32 z .byte 50
3 00000002 .text
In syntax descriptions, the instruction, command, or directive is in a bold
typeface and parameters are in an italic typeface . Portions of a syntax that
are in bold should be entered as shown; portions of a syntax that are in
italics describe the type of information that should be entered. Syntax that
is entered on a command line is centered. Syntax that is used in a text file
is left-justified. Here is an example of command-line syntax:
abs430 filename
abs430 is a command. The command invokes the absolute lister and has
one parameter, indicated by filename . When you invoke the absolute
lister, you supply the name of the file that the absolute lister uses as input.
iv
Notational Conventions
153199095.004.png
Notational Conventions
Square brackets ( [ and ] ) identify an optional parameter. If you use an
optional parameter, you specify the information within the brackets.
Unless the square brackets are in a bold typeface, do not enter the
brackets themselves. This is an example of an instruction syntax with
square brackets:
hex430 [ options ] filename
The hex430 command has two parameters. The second parameter,
filename , is required. The first parameter, options , is optional. Since
options is plural, you can select several options.
Braces ( { and } ) indicate a list. The symbol | (read as or ) separates items
within the list. You must choose one item from the list; you cannot choose
more than one item.
In assembler syntax statements, column 1 is reserved for the first
character of a label or symbol. If the label or symbol is optional, it is usually
not shown. If it is a required parameter, it is shown starting against the left
margin of the shaded box, as in the example below. No instruction,
command, directive, or parameter, other than a symbol or label, can begin
in column 1.
symbol .usect section name ”, size in bytes [ , alignment ]
The symbol is required for the .usect directive and must begin in column 1.
The section name must be enclosed in quotes and the parameter size in
bytes must be separated from the section name by a comma. The
alignment is optional and, if used, must be separated by a comma.
Some directives can have a varying number of parameters. For example,
the .byte directive can have up to 100 parameters. The syntax for this
directive is:
.byte value 1 [ , ... , value n ]
This syntax shows that .byte must have at least one value parameter, but
you have the option of supplying additional value parameters, each
separated from the previous one by a comma.
v
153199095.005.png 153199095.001.png
Zgłoś jeśli naruszono regulamin