Compare Branch and Jump Instructions for Computers

  • Thread starter Thread starter EvLer
  • Start date Start date
  • Tags Tags
    Computer
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 3K views
EvLer
Messages
454
Reaction score
0
how is "branch" instruction different from "jump"?

Thanks in advance.
 
Physics news on Phys.org
A branch instruction is conditional. If some condition is met, program flow jumps to some other location. If the condition is not met, the next instruction is executed instead.

A jump, on the other hand, is not conditional.

- Warren
 
It also sometimes has to do with language you are programming. I believed in 68HC11 code, a jump is for an absolute position, and a branch is relative. Check out the BRA and the JMP commands.

From what I have seen, it is more loose than an absolute definition.

-- MLH
 
ya, we use 68HC12. Thanks for the explanations.