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