This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assembler issue (error A152)

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

0