hex.sub.clear_carry (arity 2)ΒΆ
carry = 0. jump to c0 if it was 0, and to c1 otherwise.
SignatureΒΆ
def clear_carry c0, c1 @ ret < ..tables.ret, .dst, ..tables.res { ... }
Defined in hex/math.fj β lines 227β235 (view on GitHub).
ComplexityΒΆ
Time:
2@+5Space:
2@+20
See the complexity glossary for what @, w, dw, dbit, n mean.
Requires initΒΆ
The following must be initialised before this macro is invoked:
hex.sub.init (or hex.init)
SourceΒΆ
Click to view the macro body
def clear_carry c0, c1 @ ret < ..tables.ret, .dst, ..tables.res {
wflip ..tables.ret+w, ret, .dst
ret:
wflip ..tables.ret+w, ret
// carry is 0/f
..if0 ..tables.res, c0
.not_carry
wflip ..tables.res+w, 0xf*dw, c1
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.sub_shiftedinhex/math.fjhex.sub.clear_carryinhex/math.fj
β Previous: hex.sub.clear_carry/0
Next: hex.sub.not_carry β