• 0

conditional vs unconditional branches


Question

8 answers to this question

Recommended Posts

  • 0

I'm 99% sure that branches and jumps are the same (at least for x86 assembly they are). An unconditional jump/branch means "jump always". A conditional jump/branch only jumps on certain conditions. For example, you may have "jump if A is 0". If A is not 0, execution just continues after the next instruction.

Link to comment
Share on other sites

  • 0

conditional is like Andareed said, only conditions, where 1 == 1, 69 != 96, etc.

Unconditional would be like a function call inside the code, where there is nothing to prevent the program from not doing the jump.

Link to comment
Share on other sites

  • 0

So conditional is basically you're typical if/else type thing? And unconditional is just like some code inside a function since that will run anyway?? Have I got that right? Thanks.

Link to comment
Share on other sites

  • 0
i believe branch instructions are limited in the range of code they can access, while jump statements are not

Yup, I got it now. Cheers guys.

Link to comment
Share on other sites

  • 0
i believe branch instructions are limited in the range of code they can access, while jump statements are not

I think that depends on the processer. That statement is correct for every processor I've worked on though :)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.