how to solve this AES-51 Illegal character error in lst file?

Thread Starter

thar07

Joined Jan 3, 2015
71
After compiling the code writtent in notepad following errors were appeared in the lst file. Please help me solve these errors.

p.s :- I uploaded the assembly file

Code:
TOGGLE^1  PAGE 1

7000  1  ORG 7000H  ;pointing out stating address
  0090  2  P1 DATA 90H  ;port 1 address
7000 F500  3  BEGIN:  MOV P1,#0000H  ;Turn on the LEDs
****--------------------------------------^^--------^
****ERROR #1: Illegal character
****ERROR #1: Illegal character
****ERROR #22: Missing operand delimiter
7002 110A  4  ACALL DELAY  ;calling DELAY
7004 F500  5  MOV P1,#0FFH  ;turn off LEDs
****--------------------------------------^^--------^
****ERROR #1: Illegal character
****ERROR #1: Illegal character
****ERROR #22: Missing operand delimiter
7006 110A  6  ACALL DELAY;  ;calling DELAY
7008 80F6  7  SJMP BEGIN  ;short jump to BEGIN
700A F500  8  DELAY:  MOV R0,#89  ;add value to R0
****------------------------------------^-^^--------^
****ERROR #2: Undefined symbol
****ERROR #1: Illegal character
****ERROR #1: Illegal character
****ERROR #22: Missing operand delimiter
700C F500  9  MOV R2,#212  ;add value to R2
****------------------------------------^-^^--------^
****ERROR #2: Undefined symbol
****ERROR #1: Illegal character
****ERROR #1: Illegal character
****ERROR #22: Missing operand delimiter
700E F500  10  HERE1:  MOV R1,#255  ;add value to R1
****------------------------------------^-^^--------^
****ERROR #2: Undefined symbol
****ERROR #1: Illegal character
****ERROR #1: Illegal character
****ERROR #22: Missing operand delimiter
7010 D50000  11  HERE:  DJNZ R1,HERE  ;Decrease jump to HERE if R1 is not zero
****-------------------------------------^-^--------^
****ERROR #2: Undefined symbol
****ERROR #1: Illegal character
****ERROR #22: Missing operand delimiter
7013 D50000  12  DJNZ R0,HERE1  ;Decrease jump to HERE1 if R0 is not zero
****-------------------------------------^-^--------^
****ERROR #2: Undefined symbol
****ERROR #1: Illegal character
****ERROR #22: Missing operand delimiter
7016 D50000  13  HERE2:  DJNZ R2,HERE2  ;Decrease jump to HERE2 if R2 is not zero
****-------------------------------------^-^--------^
****ERROR #2: Undefined symbol
****ERROR #1: Illegal character
****ERROR #22: Missing operand delimiter
7019 22  14  RET  ; Return to where programe was paused
  15  END  ; END

VERSION 1.2h ASSEMBLY COMPLETE, 27 ERRORS FOUND

ERROR SUMMARY:
Line #3, ERROR #1: Illegal character
Line #3, ERROR #1: Illegal character
Line #3, ERROR #22: Missing operand delimiter
Line #5, ERROR #1: Illegal character
Line #5, ERROR #1: Illegal character
Line #5, ERROR #22: Missing operand delimiter
Line #8, ERROR #2: Undefined symbol
TOGGLE^1  PAGE 2

Line #8, ERROR #1: Illegal character
Line #8, ERROR #1: Illegal character
Line #8, ERROR #22: Missing operand delimiter
Line #9, ERROR #2: Undefined symbol
Line #9, ERROR #1: Illegal character
Line #9, ERROR #1: Illegal character
Line #9, ERROR #22: Missing operand delimiter
Line #10, ERROR #2: Undefined symbol
Line #10, ERROR #1: Illegal character
Line #10, ERROR #1: Illegal character
Line #10, ERROR #22: Missing operand delimiter
Line #11, ERROR #2: Undefined symbol
Line #11, ERROR #1: Illegal character
Line #11, ERROR #22: Missing operand delimiter
Line #12, ERROR #2: Undefined symbol
Line #12, ERROR #1: Illegal character
Line #12, ERROR #22: Missing operand delimiter
Line #13, ERROR #2: Undefined symbol
Line #13, ERROR #1: Illegal character
Line #13, ERROR #22: Missing operand delimiter
TOGGLE^1  PAGE 3

BEGIN. . . . . . . . . . . . . .  C ADDR  7000H
DELAY. . . . . . . . . . . . . .  C ADDR  700AH
HERE . . . . . . . . . . . . . .  C ADDR  7010H  NOT USED
HERE1. . . . . . . . . . . . . .  C ADDR  700EH  NOT USED
HERE2. . . . . . . . . . . . . .  C ADDR  7016H  NOT USED
P1 . . . . . . . . . . . . . . .  D ADDR  0090H
R0 . . . . . . . . . . . . . . .  UNDEFINED
R1 . . . . . . . . . . . . . . .  UNDEFINED
R2 . . . . . . . . . . . . . . .  UNDEFINED
The content of the txt file:

Code:
    ORG 7000H    ;pointing out stating address
    P1 DATA 90H    ;port 1 address
BEGIN:    MOV P1,#0000H    ;Turn on the LEDs
    ACALL DELAY    ;calling DELAY
    MOV P1,#0FFH    ;turn off LEDs
    ACALL DELAY;    ;calling DELAY
    SJMP BEGIN    ;short jump to BEGIN
DELAY:    MOV R0,#89    ;add value to R0
    MOV R2,#212    ;add value to R2
HERE1:    MOV R1,#255    ;add value to R1
HERE:    DJNZ R1,HERE    ;Decrease jump to HERE if R1 is not zero
    DJNZ R0,HERE1    ;Decrease jump to HERE1 if R0 is not zero
HERE2:    DJNZ R2,HERE2    ;Decrease jump to HERE2 if R2 is not zero
    RET        ; Return to where programe was paused
    END        ; END
Moderators note: Please use code tags for pieces of code and added text from file
 

Attachments

Last edited by a moderator:

MrChips

Joined Oct 2, 2009
19,280
Sounds like you are attempting to compile the file using a C compiler and not an Assembler.

What is your mcu?
What is your tool chain, i.e. IDE and compiler?
 

djsfantasi

Joined Apr 11, 2010
5,610
Sounds like you are attempting to compile the file using a C compiler and not an Assembler.

What is your mcu?
What is your tool chain, i.e. IDE and compiler?
Pardon my opinion, but I disagree. The listing clearly contains a line that states VERSION 1.2h ASSEMBLY COMPLETE. Why do you think it's a C compiler?

I do agree that we need further information. It looks like his syntax for a comment line is wrong.
 

bertus

Joined Apr 5, 2008
20,054
Hello,

The compiler seems to complain about the R0, R1 and R3 not to be defined.
(see the last three lines of the compiler output).

Bertus
 

Thread Starter

thar07

Joined Jan 3, 2015
71
Sounds like you are attempting to compile the file using a C compiler and not an Assembler.

What is your mcu?
What is your tool chain, i.e. IDE and compiler?
I'm sorry I forgot to mention.
MCU is 80C32 at the AES-51 Development Board.
Compiler is ASM51.exe .
 

bertus

Joined Apr 5, 2008
20,054
Hello,

I think you have made a mistake in the numbers.
I think that the # symbols before the numbers should be removed.

See the attached manual. (pages 2-7 and 2-8)

Bertus
 

Attachments

Last edited:

Thread Starter

thar07

Joined Jan 3, 2015
71
Hello,

I think you have made a mistake in the numbers.
I think that the # symbols before the numbers should be removed.

See the attached manual. (pages 2-7 and 2-8)

Bertus
I read this earlier but I could not find whats wrong with my program.
Thank you
 
Top