fault Posted July 28, 2004 Share Posted July 28, 2004 What's the difference between conditional and unconditional branches?! :huh: How about unconditional vs conditional jumps? Link to comment https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/ Share on other sites More sharing options...
0 Andareed Posted July 28, 2004 Share Posted July 28, 2004 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 https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/#findComment-584250414 Share on other sites More sharing options...
0 jonovate Posted July 28, 2004 Share Posted July 28, 2004 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 https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/#findComment-584250452 Share on other sites More sharing options...
0 Original_ Posted July 28, 2004 Share Posted July 28, 2004 Unconditional - No matter what I am gonna do this Conditional - I'll do this, if you satisfy the pre-conditions for it. Link to comment https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/#findComment-584250474 Share on other sites More sharing options...
0 fault Posted July 28, 2004 Author Share Posted July 28, 2004 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 https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/#findComment-584250692 Share on other sites More sharing options...
0 Andareed Posted July 28, 2004 Share Posted July 28, 2004 Yes. You can also look at uncoditional jump as being the same as 'goto' in C/Basic Link to comment https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/#findComment-584253565 Share on other sites More sharing options...
0 caustiK Posted July 28, 2004 Share Posted July 28, 2004 i believe branch instructions are limited in the range of code they can access, while jump statements are not Link to comment https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/#findComment-584254419 Share on other sites More sharing options...
0 fault Posted July 29, 2004 Author Share Posted July 29, 2004 caustiK said: 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 https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/#findComment-584260746 Share on other sites More sharing options...
0 bithub Posted August 2, 2004 Share Posted August 2, 2004 Quote 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 https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/#findComment-584281880 Share on other sites More sharing options...
Question
fault
What's the difference between conditional and unconditional branches?! :huh: How about unconditional vs conditional jumps?
Link to comment
https://www.neowin.net/forum/topic/195876-conditional-vs-unconditional-branches/Share on other sites
8 answers to this question
Recommended Posts