|ARM Technical Support Knowledge Articles|
Applies to: A51 Macro Assembler
Information in this article applies to:
I have defined the following MACRO in my assembly file:
INC_BUF_POINTER MACRO X,Y,Z,W ; LOCAL IBP1 ; INC DPTR ; MOV A,DPL CJNE A,#LOW(X),IBP1 . . . ENDM
When I assemble this in my program, I get the following error message:
=1 1488 INC_BUF_POINTER COM_BUF_END,COM_BUF_START,COM_BUF_HEAD_H,COM_BUF_HEAD_L =1 1489+1 ; =1 1490+1 LOCAL IBP1 *** _________________________________^ *** ERROR #9 IN 1490 (SB1SBSMARTPADKEIL.V08RS232.A51, LINE 393): SYNTAX ERROR
What can I do for this?
The LOCAL directive must be specified immediately after the MACRO definition. If it is not, the text LOCAL will be included in the macro expansion. Since LOCAL is not a recognized keyword (by the assembler), the error results.
Change your macro definition to read as follows:
INC_BUF_POINTER MACRO X,Y,Z,W LOCAL IBP1 . . . ENDM
When you re-assemble your program, the error will go away.
Refer to the A51/AX51 User's Guide, Chapter 5, Assembler Macros, Labels for more information about the LOCAL directive.
Article last edited on: 2004-05-10 15:32:05
Did you find this article helpful? Yes No
How can we improve this article?