13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 3. Assembly LanguageThis chapter describes the most important aspects of the <strong>TASKING</strong> assembly language <strong>for</strong> <strong>ARM</strong> andcontains a detailed description of all built-in assembly functions and assembler directives. For a completeoverview of the architecture you are using and a description of the assembly instruction set, refer to thetarget's core reference manual (<strong>for</strong> example the <strong>ARM</strong> Architecture Reference Manual <strong>ARM</strong> DDI 0100I[2005, <strong>ARM</strong> Limited]).3.1. Assembly SyntaxAn assembly program consists of statements. A statement may optionally be followed by a comment.Any source statement can be extended to more lines by including the line continuation character (\) asthe last character on the line. The length of a source statement (first line and continuation lines) is onlylimited by the amount of available memory.Mnemonics, directives and other keywords are case insensitive. Labels, symbols, directive arguments,and literal strings are case sensitive.The syntax of an assembly statement is:[label[:]] [instruction | directive | macro_call] [;comment]labelA label is a special symbol which is assigned the value and type of the currentprogram location counter. A label can consist of letters, digits and underscorecharacters (_). The first character cannot be a digit. The label can also be anumber. A label which is prefixed by whitespace (spaces or tabs) has to befollowed by a colon (:). The size of an identifier is only limited by the amount ofavailable memory.number is a number ranging from 1 to 255. This type of label is called a numericlabel or local label. To refer to a numeric label, you must put an n (next) or p(previous) immediately after the label. This is required because the same labelnumber may be used repeatedly.Examples:LAB1: ; This label is followed by a colon and; can be prefixed by whitespaceLAB1 ; This label has to start at the beginning; of a line1: b 1p ; This is an endless loop; using numeric labels83

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

Saved successfully!

Ooh no, something went wrong!