RosettaCodeData/Task/Conditional-structures/LC3-Assembly/conditional-structures-1.lc3

11 lines
383 B
Plaintext

BR or BRnzp ; unconditional branch, i.e.
; branch if (result < 0 || result == 0 || result > 0)
; ^ this is always true
BRn ; branch if (result < 0)
BRz ; branch if (result == 0)
BRp ; branch if (result > 0)
; or any combination of these condition codes, e.g.
BRnz ; branch if (result <= 0)