HC12 mcu ERROR illegal redefinition of label

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HC12 mcu ERROR illegal redefinition of label

Jump to solution
2,141 Views
ram4010
Contributor I

ADD_OP               EQU         $11

SUB_OP               EQU         $22

MUL_OP               EQU         $33

CLR_OP               EQU         $44

END_OP               EQU         $55

PROG_START      EQU          $1100

OUTPUT                EQU         $1050         

 

 

 

 

 

 

                ORG         $1000

                FCB         $45,$11,$54,$33,$37,$22,$31,$44,$04,$33,$02,$11,$F9,$55

               

                ORG    PROG_START                                          ;program is written to memory location               

                LDX         #$1000

                LDY         #$1001

                STX          $2020

                STY           $2022

                LDX           #$1050

                STX            $2015

                 LDX           #$01

                STX            $2013

LOOP       LDAA        #$00                              ;reset the ccr to test loop counter value

                TAP

                TST            $2013                              ;test counter memory location to change the operand 1's location

                BNE           LOOPTWO

                MOVW        $2015,$2020                 ; to change the operand 1 location with in memory

  

 

LOOPTWO         DEC    $2013                      ;to decrement value of the counter for the loops

                          LDX    $2020

                          LDY    $2022

                          LDAA        1,X+                          ;to load the oprand1

                          STX    $2020

                          LDAB    2,Y+                      ;to load the operation / oprand2

                         STY    $2022

                         CMPB        #$44                       ;clear test

                         BNE         SUB_CHK

                         JMP         CLR_OP

SUB_CHK         CMPB        #$22                    ;subtraction test

                         BNE         ADD_CHK

                        JMP         SUB_OP

ADD_CHK         CMPB        #$11                       ;addition test

                        BNE         MUL_CHK

                         JMP         ADD_OP

MUL_CHK         CMPB        #$33                          ;multiplication test

                         BNE         END_CHK

                         JMP         MUL_OP         

END_CHK         CMPB        #$55                          ;end test

                        BNE         FINAL

 

 

                               

CLR_OP          LDAB    -1,Y                                   ;op clear                                   //Here is where i get the error A1103 Illegal redefinition of label

                       TBA

                       LDAB    #$00

                       STAB    OUTPUT

                      JMP         LOOP

 

 

SUB_OP          LDAB    -1,Y                                   ;op subtract                              //Also here the same error

                       SBA                          

                       JMP         TEST

 

 

// I have no idea what the error is i try to move the labels around i have 3 columns for the (labels,op code, oprand). Please any help would be appreciated.


Thank you

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
1,326 Views
ZhangJennie
NXP TechSupport
NXP TechSupport


the  A1103 means "The label specified in front of a comment or an assembly instruction or directive, is detected twice in a source file."

please change CLR_OP to other name such as CLR_OP_1 to see if this can fix the problem.

Hope this helps

View solution in original post

0 Kudos
Reply
4 Replies
1,326 Views
ram4010
Contributor I

Thank you it worked.

0 Kudos
Reply
1,326 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

you are welcome!

0 Kudos
Reply
1,326 Views
ram4010
Contributor I

Hello,

I am having another problem in my program once I compare the second value of the FCB string $11 it is suppose to JMP to the operation add_op and perform the action something is wrong it never JMP? Any ideas?

Thank you,

Andrew

0 Kudos
Reply
1,327 Views
ZhangJennie
NXP TechSupport
NXP TechSupport


the  A1103 means "The label specified in front of a comment or an assembly instruction or directive, is detected twice in a source file."

please change CLR_OP to other name such as CLR_OP_1 to see if this can fix the problem.

Hope this helps

0 Kudos
Reply