| поискавой системы для электроныых деталей |
|
UM0144 датащи(PDF) 28 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0144 датащи(HTML) 28 Page - STMicroelectronics |
|
28 / 92 page ![]() 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¶m:nop label¶m&_¶m: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. |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| 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 |