AnsweredAssumed Answered

HC12 mcu ERROR illegal redefinition of label

Question asked by Andrew Ramos on Aug 13, 2013
Latest reply on Aug 14, 2013 by Andrew Ramos

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

Outcomes