This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error A45 undefined symbol (pass 2)

i am makinga 4x4 keypad interacing program where da character pressed has to be sent serially to anothr board..
checking all 4 coulumns for each row,
i gave a an exit command

jb col4 exit

where da exit subroutine was written at da end
fisrt it gave me an error (TARGET OUT OF REACH)
THEN, realizing jb doesnt hav long enough range, i changed it to

jb col4 JUMP
JUMP: acall exit

now its giving an error "UNDEFINED SYMBOL (PASS 2)

tell me what to do? i have to make it jump only if my "jb col4" condition is fulfilled

Parents
  • I'm less than convinced that you should be writing any code in assembly language. For starters:

    i gave a an exit command

    No. You scribbled something that's not even syntactically valid assembly code, much less an "exit command" of any description.

      jb col4 exit
    

    That's missing a comma. Yes, that may seem like nitpicking, but seriously: if you're not prepared to go into a nitpicking contest with some pretty picky tools, you shouldn't be coding in assembly.

    now its giving an error "UNDEFINED SYMBOL (PASS 2)

    No, it's not --- because beyond a reasonable doubt, that's not the entire error message you actually got. For starters, you didn't even bother to reproduce the name of the symbol it complained about.

    So, do you actually have any symbol called "exit"? And are you sure you want to call that symbol, instead of, say, jumping to it? And did you start thinking how execution would ever reach the "else" part of that construct, i.e. the code following it?

Reply
  • I'm less than convinced that you should be writing any code in assembly language. For starters:

    i gave a an exit command

    No. You scribbled something that's not even syntactically valid assembly code, much less an "exit command" of any description.

      jb col4 exit
    

    That's missing a comma. Yes, that may seem like nitpicking, but seriously: if you're not prepared to go into a nitpicking contest with some pretty picky tools, you shouldn't be coding in assembly.

    now its giving an error "UNDEFINED SYMBOL (PASS 2)

    No, it's not --- because beyond a reasonable doubt, that's not the entire error message you actually got. For starters, you didn't even bother to reproduce the name of the symbol it complained about.

    So, do you actually have any symbol called "exit"? And are you sure you want to call that symbol, instead of, say, jumping to it? And did you start thinking how execution would ever reach the "else" part of that construct, i.e. the code following it?

Children
  • Note that compilers can be just as picky about missing or misplaced "punctuation".

    Programming - in any form - is all about attention to detail; if you can't be bothered with that, then programming - in any form - is not for you.

    People may give you the benefit of the doubt; eg, assuming that "da" is supposed to mean "the" - but programming tools will permit no such laxity...

  • yea well ok..thanks
    u know what i mean... or atleast i assumed that you do.. i thought of stating the error that i actually got in the program, and to get it solved by discussing the error and that specific life of the code where it is present..instead of giving the whole story cz this is the only error in the 300 line code..

    i know about the comma and i know about the jump/call differnce

    if u have the answer to the real question, i'll be grateful for your assistance..
    and if you dont, then just say it....i know i can program in assembly
    but i guess you dont..thanks for the discouragement

  • respected Sir,
    i did give da comma
    n may be because english is not my mother tounge, thats y i m unable to make you understand my problem..
    still it doesnt mean that i cant program in assembly...

    'da" and "the"
    i know where the difference matters.. *sigh*
    thanks anyways

  • i know about the comma and i know about the jump/call differnce

    And you blissfully hid that knowledge under the carpet .... why?

    if u have the answer to the real question,

    You have made it both impossible and undesirable for anyone to actually give you that answer.

    Undesirable by stubbornly insisting on childish SMS language despite having it pointed out as inappropriate.

    Impossible by stubbornly refusing to supply any useful information, despite being called out on that, too.

    i know i can program in assembly

    No. You only believe so, and that belief is clearly wrong. And the very facts that a) you had to ask this question in the first place, b) are unable to state the question in a usable fashion, and c) can't be bothered with the required level of precision of expressing yourself, prove that.