EASy68K  
It is currently Tue Aug 21, 2018 5:41 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu May 03, 2018 6:38 am 
Offline

Joined: Thu May 03, 2018 6:23 am
Posts: 1
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!


Top
 Profile  
 
PostPosted: Thu May 03, 2018 12:59 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1075
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

_________________
Prof. Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group