Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Branch (computer science)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Examples=== Depending on the [[computer architecture]], the [[assembly language]] [[mnemonic]] for a jump instruction is typically some shortened form of the word ''jump'' or the word ''branch'', often along with other informative letters (or an extra parameter) representing the condition. Sometimes other details are included as well, such as the range of the jump (the offset size) or a special addressing mode that should be used to locate the actual effective offset. This table lists the machine level branch or jump instructions found in several well-known architectures: {| class="wikitable" ! scope="col" | condition or result ! scope="col" | x86 ! scope="col" | PDP-11, VAX ! scope="col" | ARM (partly 6502) ! scope="col" | equation |- | zero (implies equal for sub/cmp) | JZ; JNZ | BEQ; BNE | BEQ; BNE | zero; not zero |- | negative (N), sign (S), or minus (M) | JS; JNS | BMI; BPL | BMI; BPL | negative; not negative |- | arithmetic overflow (flag called O or V) | JO; JNO | BVS; BVC | BVS; BVC | overflow; not overflow |- | carry (from add, cmp, shift, etc.) | JC; JNC | BCS; BCC | BCS; BCC | carry; not carry |- | ''unsigned'' below (lower) | JB | BLO | BLO <sup>*</sup> | borrow |- | ''unsigned'' below or equal (lower or same) | JBE | BLOS | BLS <sup>*</sup> | borrow or zero |- | ''unsigned'' above or equal (higher or same) | JAE | BHIS | BHS <sup>*</sup> | not borrow |- | ''unsigned'' above (higher) | JA | BHI | BHI <sup>*</sup> | not borrow and not zero |- | ''signed'' less than | JL | BLT | BLT | sign≠overflow |- | ''signed'' less or equal | JLE | BLE | BLE | (sign≠overflow) or zero |- | ''signed'' greater or equal | JGE | BGE | BGE | sign=overflow |- | ''signed'' greater than | JG | BGT | BGT | (sign=overflow) and not zero |} <sup>*</sup> x86, the PDP-11, VAX, and some others, set the carry-flag to signal ''borrow'' and clear the carry-flag to signal ''no borrow''. ARM, [[6502]], the PIC, and some others, do the opposite for subtractive operations. This inverted function of the carry flag for certain instructions is marked by (<sup>*</sup>), that is, '''borrow=<u>not</u> carry''' in some parts of the table, but if not otherwise noted, borrow≡carry. However, carry on additive operations are handled the same way by most architectures.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)