0

I had this question on my exam yesterday and it is still puzzling me. Could someone please explain to me why the 68000 isa include both singed and unsigned branches.

  • 1
    I have been working with the 68k family for years, there is no such term commonly used in the 68k jargon. Do you mean *conditional/unconditional* or are you talking about *branch offsets/distances*? – Durandal Oct 27 '14 at 17:36
  • Or do you mean *branch predicates*? – Durandal Oct 27 '14 at 18:04

2 Answers2

2

The question is probably about bhi/blo/bhs/bls branches versus bgt/blt/bge/ble branches.
The former group takes into account only C and Z flags, which is useful when you compare values you treat as unsigned.
The latter group takes into account only N, V and Z flags, which allows you to compare signed values.
You can find more here and here.

Community
  • 1
  • 1
lvd
  • 793
  • 3
  • 12
0

It's actually not the branches, but the comparison that is signed or unsigned. The cmp instruction (and all other instructions that affect the N, V, Z, C flags) return both a result that can be interpreted as both signed and unsigned depending on wether the N and V flag (signed) or the C (unsigned) flag are considered in addition to the Z flag in the interpretation. bh[is]/bl[os] do the former, bg[te] and bl[te] do the latter.

tofro
  • 5,640
  • 14
  • 31