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

Discussion in 'Embedded Systems and Microcontrollers' started by thar07, Jan 3, 2015.

  1. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    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 (Text):
    1.  
    2. TOGGLE^1  PAGE 1
    3.  
    4. 7000  1  ORG 7000H  ;pointing out stating address
    5.   0090  2  P1 DATA 90H  ;port 1 address
    6. 7000 F500  3  BEGIN:  MOV P1,#0000H  ;Turn on the LEDs
    7. ****--------------------------------------^^--------^
    8. ****ERROR #1: Illegal character
    9. ****ERROR #1: Illegal character
    10. ****ERROR #22: Missing operand delimiter
    11. 7002 110A  4  ACALL DELAY  ;calling DELAY
    12. 7004 F500  5  MOV P1,#0FFH  ;turn off LEDs
    13. ****--------------------------------------^^--------^
    14. ****ERROR #1: Illegal character
    15. ****ERROR #1: Illegal character
    16. ****ERROR #22: Missing operand delimiter
    17. 7006 110A  6  ACALL DELAY;  ;calling DELAY
    18. 7008 80F6  7  SJMP BEGIN  ;short jump to BEGIN
    19. 700A F500  8  DELAY:  MOV R0,#89  ;add value to R0
    20. ****------------------------------------^-^^--------^
    21. ****ERROR #2: Undefined symbol
    22. ****ERROR #1: Illegal character
    23. ****ERROR #1: Illegal character
    24. ****ERROR #22: Missing operand delimiter
    25. 700C F500  9  MOV R2,#212  ;add value to R2
    26. ****------------------------------------^-^^--------^
    27. ****ERROR #2: Undefined symbol
    28. ****ERROR #1: Illegal character
    29. ****ERROR #1: Illegal character
    30. ****ERROR #22: Missing operand delimiter
    31. 700E F500  10  HERE1:  MOV R1,#255  ;add value to R1
    32. ****------------------------------------^-^^--------^
    33. ****ERROR #2: Undefined symbol
    34. ****ERROR #1: Illegal character
    35. ****ERROR #1: Illegal character
    36. ****ERROR #22: Missing operand delimiter
    37. 7010 D50000  11  HERE:  DJNZ R1,HERE  ;Decrease jump to HERE if R1 is not zero
    38. ****-------------------------------------^-^--------^
    39. ****ERROR #2: Undefined symbol
    40. ****ERROR #1: Illegal character
    41. ****ERROR #22: Missing operand delimiter
    42. 7013 D50000  12  DJNZ R0,HERE1  ;Decrease jump to HERE1 if R0 is not zero
    43. ****-------------------------------------^-^--------^
    44. ****ERROR #2: Undefined symbol
    45. ****ERROR #1: Illegal character
    46. ****ERROR #22: Missing operand delimiter
    47. 7016 D50000  13  HERE2:  DJNZ R2,HERE2  ;Decrease jump to HERE2 if R2 is not zero
    48. ****-------------------------------------^-^--------^
    49. ****ERROR #2: Undefined symbol
    50. ****ERROR #1: Illegal character
    51. ****ERROR #22: Missing operand delimiter
    52. 7019 22  14  RET  ; Return to where programe was paused
    53.   15  END  ; END
    54.  
    55. VERSION 1.2h ASSEMBLY COMPLETE, 27 ERRORS FOUND
    56.  
    57. ERROR SUMMARY:
    58. Line #3, ERROR #1: Illegal character
    59. Line #3, ERROR #1: Illegal character
    60. Line #3, ERROR #22: Missing operand delimiter
    61. Line #5, ERROR #1: Illegal character
    62. Line #5, ERROR #1: Illegal character
    63. Line #5, ERROR #22: Missing operand delimiter
    64. Line #8, ERROR #2: Undefined symbol
    65. TOGGLE^1  PAGE 2
    66.  
    67. Line #8, ERROR #1: Illegal character
    68. Line #8, ERROR #1: Illegal character
    69. Line #8, ERROR #22: Missing operand delimiter
    70. Line #9, ERROR #2: Undefined symbol
    71. Line #9, ERROR #1: Illegal character
    72. Line #9, ERROR #1: Illegal character
    73. Line #9, ERROR #22: Missing operand delimiter
    74. Line #10, ERROR #2: Undefined symbol
    75. Line #10, ERROR #1: Illegal character
    76. Line #10, ERROR #1: Illegal character
    77. Line #10, ERROR #22: Missing operand delimiter
    78. Line #11, ERROR #2: Undefined symbol
    79. Line #11, ERROR #1: Illegal character
    80. Line #11, ERROR #22: Missing operand delimiter
    81. Line #12, ERROR #2: Undefined symbol
    82. Line #12, ERROR #1: Illegal character
    83. Line #12, ERROR #22: Missing operand delimiter
    84. Line #13, ERROR #2: Undefined symbol
    85. Line #13, ERROR #1: Illegal character
    86. Line #13, ERROR #22: Missing operand delimiter
    87. TOGGLE^1  PAGE 3
    88.  
    89. BEGIN. . . . . . . . . . . . . .  C ADDR  7000H
    90. DELAY. . . . . . . . . . . . . .  C ADDR  700AH
    91. HERE . . . . . . . . . . . . . .  C ADDR  7010H  NOT USED
    92. HERE1. . . . . . . . . . . . . .  C ADDR  700EH  NOT USED
    93. HERE2. . . . . . . . . . . . . .  C ADDR  7016H  NOT USED
    94. P1 . . . . . . . . . . . . . . .  D ADDR  0090H
    95. R0 . . . . . . . . . . . . . . .  UNDEFINED
    96. R1 . . . . . . . . . . . . . . .  UNDEFINED
    97. R2 . . . . . . . . . . . . . . .  UNDEFINED
    98.  
    99.  
    The content of the txt file:

    Code (Text):
    1.  
    2.     ORG 7000H    ;pointing out stating address
    3.     P1 DATA 90H    ;port 1 address
    4. BEGIN:    MOV P1,#0000H    ;Turn on the LEDs
    5.     ACALL DELAY    ;calling DELAY
    6.     MOV P1,#0FFH    ;turn off LEDs
    7.     ACALL DELAY;    ;calling DELAY
    8.     SJMP BEGIN    ;short jump to BEGIN
    9. DELAY:    MOV R0,#89    ;add value to R0
    10.     MOV R2,#212    ;add value to R2
    11. HERE1:    MOV R1,#255    ;add value to R1
    12. HERE:    DJNZ R1,HERE    ;Decrease jump to HERE if R1 is not zero
    13.     DJNZ R0,HERE1    ;Decrease jump to HERE1 if R0 is not zero
    14. HERE2:    DJNZ R2,HERE2    ;Decrease jump to HERE2 if R2 is not zero
    15.     RET        ; Return to where programe was paused
    16.     END        ; END
    17.  
    Moderators note: Please use code tags for pieces of code and added text from file
     
    Last edited by a moderator: Jan 3, 2015
  2. MrChips

    Moderator

    Oct 2, 2009
    12,439
    3,360
    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?
     
  3. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    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.
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    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
     
  5. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    I'm sorry I forgot to mention.
    MCU is 80C32 at the AES-51 Development Board.
    Compiler is ASM51.exe .
     
  6. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    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
     
    Last edited: Jan 4, 2015
  7. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    I read this earlier but I could not find whats wrong with my program.
    Thank you
     
  8. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    Hello,

    I have tried to compile your program.
    It compiled without any errors:

    [​IMG]

    Bertus
     
    thar07 likes this.
  9. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    Did you compile with AES-51 ?
    Could you please attache the ".lst" file ??
     
  10. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    Hello,

    No, I compiled with the ASM51.EXE I found on the net.

    Bertus
     
    thar07 likes this.
  11. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    I think there is a problem with my compiler.

    Thank you very much :) :) :)
     
Loading...