Datenblatt-Suchmaschine für elektronische Bauteile
  German  ▼
ALLDATASHEETDE.COM

X  

AN3350 Datenblatt(PDF) 67 Page - STMicroelectronics

Teilenummer AN3350
Bauteilbeschribung  eTPU compiler tools
PDF  185 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Hersteller  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3350 Datenblatt(HTML) 67 Page - STMicroelectronics

Back Button AN3350 Datasheet HTML 63Page - STMicroelectronics AN3350 Datasheet HTML 64Page - STMicroelectronics AN3350 Datasheet HTML 65Page - STMicroelectronics AN3350 Datasheet HTML 66Page - STMicroelectronics AN3350 Datasheet HTML 67Page - STMicroelectronics AN3350 Datasheet HTML 68Page - STMicroelectronics AN3350 Datasheet HTML 69Page - STMicroelectronics AN3350 Datasheet HTML 70Page - STMicroelectronics AN3350 Datasheet HTML 71Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 67 / 185 page
background image
AN3350
Working with the assembler
Doc ID 018512 Rev 2
67/185
Operators, however, may require a specific kind or number of tokens as operands.
Operations experiencing bad input will either evaluate to the zero token (the %str(X)
operation tests its argument as a single-string token) or will create an error (the #include
directive expects its argument to be a single string).
10.5.1
Preprocessor macros
Macros, regular and multi-lined, enable the definition and use of named segments of text. A
macro invocation is also named 'a call'. It is necessary to define macros in the code prior to
invocation. Code expansion is done during the call (and not while preprocessing the
definition).
10.5.2
Regular (single-line) macros
A single-line macro is defined on a single line of code using the #define directive:
#define macroName[optionalArgs] definition
macroName
is a case-sensitive, valid identifier.
optionalArgs
is an optional comma-separated list of unique identifiers enclosed by
parentheses. When a macro has arguments, parentheses must immediately follow the
name - no white space is allowed.
definition
is an arbitrary combination of tokens intended to replace the call.
For example:
#define START_OF_FUNC 0x1b3f
This example defines START_OF_FUNC as a macro with no arguments. The assembler
replaces the identifier START_OF_FUNC with the number 0x1b3f wherever the identifier
appears in the code.
To substitute the value of an argument within a definition, the argument's name must be
placed in the substituting code. For example:
#define param(offset,word_size) offset + 4 * word_size
This example code replaces the call param(MY_START, 11) with MY_START + 4 * 11.
Note:
The token sequence 4 * 11 does not evaluate to 44 at compile time. To evaluate an
expression at compile time, use %eval: expression evaluation.
Note:
If you define macros with numerical calculations, we recommend that you enclose each
argument occurrence (or even the entire definition) with parentheses. Doing so prevents
unwanted side effects during evaluation.
For instance, the previous example definition would be better defined as:
#define param(offset,word_size) ((offset) + 4 * (word_size))
It is possible to nest macros by defining them inside of other macros. Macro expansion
normally occurs during invocation and not during compilation (you can use the #xdefine
directive to expand macros during compilation instead). For example, in the following two
lines, the assembler expands the BBB macro to 100 + 200 regardless of the order of
definition.
#define AAA 100
#define BBB AAA + 200



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datenblatt Download

Go To PDF Page


Link URL



War ALLDATASHEET hilfreich?  [ DONATE ] 

Über Alldatasheet   |   Werbung   |   Kontakt   |   Privatsphäre und Datenschutz   |   Link zum Datenblatt    |   Linktausch   |   Hersteller
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com