EASy68K
http://easy68k.com/EASy68Kforum/

Unknown undefined label in subroutine
http://easy68k.com/EASy68Kforum/viewtopic.php?f=5&t=1631
Page 1 of 1

Author:  erikj23 [ Thu May 03, 2018 6:38 am ]
Post subject:  Unknown undefined label in subroutine

Hi,

Below I have a subroutine I am trying to debug, for some reason I am getting an undefined symbol error on the line with ***
but not on the second line with ***, I don't understand why the errror is appearing becuase they are both essentially just comparing
and then branching. Am I missing something here? I couldn't find anything in the motorolla 68000 reference manual about it or in the easy68k help.

Code:
STR_TO_HEX: * Converts string to hexadecimal stored in variable hex and register d3
        * Clear data registers
        bsr             clear_data

        * For 1 to str_length do the following
        for.w d0 = #1 to str_length do.s
                * Move BYTE from address containing string data into d2
                move.b          (a1)+,d2

                * If BYTE in d2 is greater than #$60 then subtract #$57
                if.b d2 <GT> #$60 then.s
                        subi.b          #$57,d2
                        move.b          #$01,d5
                endi

                * Branch if already subtracted
                cmpi.b          #$01,d5
                beq             .skip_sub **************************************** ERROR: Undefined symbol

                * If BYTE in d2 is greater than #$40 then subtract #$37
                if.b d2 <GT> #$40 then.s
                        subi.b          #$37,d2
                endi

                * If BYTE in d2 is less than #$40 then subract #$30
                if.b d2 <LT> #$40 then.s
                        subi.b          #$30,d2
                endi
.SKIP_SUB
                * Add BYTE to d3 and lsl, skip lsl when str_length and d0 are equal     
                add.b           d2,d3
                cmp.w           str_length,d0
                beq             .skip_shift ************************************** no error here
                lsl.l           #$04,d3
.SKIP_SHIFT
        endf
        move.l          d3,hex                  Move LONG data from d3 into variable hex
        *bsr             clear_data              Clear data registers
        rts


Thanks!

Author:  profkelly [ Thu May 03, 2018 12:59 pm ]
Post subject:  Re: Unknown undefined label in subroutine

The parser is confused by the leading dot in the name. A temporary fix is to remove the leading dots.

SKIP_SUB instead of .SKIP_SUB

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/