We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I have included a file2.asm into a file1.asm using the following directive : $INCLUDE(file2.asm)
When calling the A66 assembler on file1.asm, inclusion is well done but the following error appears :
C:\SourceCode\file2.asm(2): error A152: MPL FUNCTION 'THEN': '(' EXPECTED
I can't understand why... Here under the file2.asm content...
Any help would be highly appreciated !!
pr64
$IF MEM_TEST %TESTAREA( 020000H, 0800H ) ; start address 20000h, number of bytes 18000h %TESTAREA( 038000H, 07FF0H ) ; start address 38000h, number of bytes 7FF0h %TESTAREA( 040000H, 0500H ) ; start address 40000h, number of bytes 40000h __memerror: ; Fill in your own error handler below this line: ; Example error handler. For demonstration purposes only!! EXTERN _error_code:WORD EXTERN _error_addr_high:WORD EXTERN _error_addr_low:WORD $IF SMALL MOV _error_code,R8 MOV _error_addr_high,R13 ; store error address into C variables MOV _error_addr_low,R12 $ELSE MOV DPP2:_error_code,R8 MOV DPP2:_error_addr_high,R13 ; store error address into C variables MOV DPP2:_error_addr_low,R12 $ENDIF __memok: ; R8 = 0 (no errors detected) ; continue $ELSE ; macro MEM_TEST is not defined EXTERN _error_code:WORD MOV R8,#4 ; error code = 4: no memory test performed! $IF SMALL MOV _error_code,R8 $ELSE MOV DPP2:_error_code,R8 $ENDIF $ENDIF
"I am trying to port ... from tasking to keil: assembler should be the same..."
What makes you think that?
Assembler syntax is not standardised!
I know that assemblers syntaxes can be different but the assembly errors do not seem to be from assembly but from macros...
do not seem to be from assembly but from macros...
Obviously macros are an integral part of assembly syntax. They're much less standardized than the machine language mnemonics themself, too.
Macros are just about the last thing you should expect to be able to just copy and use from one assembler to the other
1) save your stuff in a safe place 2) copy the actual macro in place of the macro call 3) assemble that 4) this will give you line number in the macro 5) the reason will bne obvious 6) correct it - just to see 7) restore what you put in a safe place 8) correct the macro 9) assemble with no error 10) smile
been there, done that
Erik