hex.if_flagsΒΆ
Jumps to l1 if bit hex of the 16-bit flags constant is set, else l0.
SignatureΒΆ
def if_flags hex, flags, l0, l1 @ switch, clean, return, finish { ... }
Defined in hex/cond_jumps.fj β lines 12β26 (view on GitHub).
ComplexityΒΆ
Time:
@-1Space:
@+15
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def if_flags hex, flags, l0, l1 @ switch, clean, return, finish {
wflip hex+w, switch, hex
pad 16
switch:
rep(16, i) stl.fj (flags>>i)&1 ? return+dbit+0 : 0, clean
clean:
wflip hex+w, switch
return: ;finish
pad 2
finish:
; l0
return+dbit+0; l1
}
Used byΒΆ
Example usesΒΆ
hex.ifinhex/cond_jumps.fjhex.signinhex/cond_jumps.fjhex.input_as_hexinhex/input.fj
Next: hex.if/3 β