Motore di ricerca datesheet componenti elettronici
  Italian  ▼
ALLDATASHEETIT.COM

X  

UM0144 Scheda tecnica(PDF) 28 Page - STMicroelectronics

Il numero della parte UM0144
Spiegazioni elettronici  ST7 Assembler Linker
PDF  92 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Produttore elettronici  STMICROELECTRONICS [STMicroelectronics]
Homepage  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0144 Scheda tecnica(HTML) 28 Page - STMicroelectronics

Back Button UM0144 Datasheet HTML 24Page - STMicroelectronics UM0144 Datasheet HTML 25Page - STMicroelectronics UM0144 Datasheet HTML 26Page - STMicroelectronics UM0144 Datasheet HTML 27Page - STMicroelectronics UM0144 Datasheet HTML 28Page - STMicroelectronics UM0144 Datasheet HTML 29Page - STMicroelectronics UM0144 Datasheet HTML 30Page - STMicroelectronics UM0144 Datasheet HTML 31Page - STMicroelectronics UM0144 Datasheet HTML 32Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 28 / 92 page
background image
3 ST7 Assembler
ST7 Assembler Linker
28/92
UM0144
For example:
This macro creates the code for a loop to await IO port at $C000 to go low. Without the LOCAL
directive, the label 'loop' would be defined as many times as the macro is called, producing
syntax errors at assembly time.
Because it's been declared LOCAL at the start of the MACRO definition, the assembler takes
care of it. Wherever it sees the label 'loop' inside the macro, it changes the name 'loop' to
'LOCXXXX' where XXXX is a hex number from 0000 to FFFF.
Each time a local label is used, XXXX is incremented. So, the first time the getio macro is
called, 'loop' is actually defined as 'LOC0', the second time as 'LOC1' and so on, each of these
being a unique reference name. The reference to 'loop' in the 'if' statement is also detected
and changed to the appropriate new local variable.
The directives in
Table 10 are very useful, in conjunction with macros:
3.5.2
Parameter substitution
The assembler looks for macro parameters after every space character. If you want to embed a
parameter, for example, in the middle of a label, you must precede the parameter name with an
ampersand '&' character, to make the parameter visible to the preprocessor. For example, if we
have a parameter called 'param'.,
dc.w param
it works as expected, but the ampersand is necessary on:
label&param:nop
label&param&_&param:nop
Otherwise 'labelparam' would be left as a valid label name; If the macro parameter 'param'
had the value '5', then 'label5' and 'label5_5' would be created.
getio
MACRO
LOCAL loop
loop
ld A,$C000
jra loop
MEND
Table 10.
Some useful directives
Directive
Usage
#IFB
To implement macro optional parameters.
#IFDEF
To test if a parameter is defined.
#IFLAB
To test if a parameter is a label.
#IFIDN
To compare a parameter to a given string.



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


Scheda tecnica Scarica

Go To PDF Page


Link URL



Lei ha avuto il aiuto da alldatasheet?  [ DONATE ] 

Di alldatasheet   |   Richest di pubblicita   |   contatti   |   Privacy Policy   |   Collegamento alla scheda tecnica    |   scambio Link   |   Ricerca produttore
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