| Electronic Components Datasheet Search |
|
UM0144 Datasheet(PDF) 65 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0144 Datasheet(HTML) 65 Page - STMicroelectronics |
|
65 / 92 page ![]() ST7 Assembler Linker UM0144 65/92 A.36 LOCAL A.37 LONG Purpose: Define labels as local to macro. Format: LOCAL <arg> Description: A macro that generates loop code gives rise to an assembly problem since the loop label would be defined as many times as the macro is called. The LOCAL directive enables you to overcome this difficulty. Consider the following piece of code: waiter MACRO ads loop ld A,ads jrne loop MEND If this macro is called twice, you will be creating two labels called 'loop'. The answer is to declare very early in the MACRO all labels created by the macro as LOCAL. This has the effect of replacing the actual name of a local label (here 'loop') with LOCXXXX where XXXX starts from 0 and increments each time a local label is used. This provides each occurrence of the labels created inside the macro with a unique identity. Example: See Also: MACRO, MEND Purpose: Define long word in object code. Format: LONG <exp>[,<exp>...] Description: This directive forces the long word(s) in its argument list into the object code at the current address. The arguments may be composed of complex expressions, which may even include external labels. If the argument was an expression and had a value greater than FFFFFFFF then the 32 bits of the expression are used and no errors are generated. LONG sends long words with the least significant byte first. It's generally used for defining data tables. Synonymous with DC.L, except that LONG sends the low-byte first. Example: See Also: DC.B, DC.L, DC.W, BYTE, STRING, WORD waiter MACRO ads LOCAL loop loop led Aids drone loop MEND DC.L 1,$12345678 ; 0000,0001,1234,5678 LONG 1,$12345678 ; 0100,0000,7856,3421 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |