shr

Group: bits

Perform a logical shift right.

Syntax

shr out:r-op source:r-op offset:r-op
shr void source:r-op offset:r-op
    

Semantics

Bits in source value are shifted to the right by the number specifier by the integer from the offset operand, zeroes are used to pad the value from the left. The source value is modified in-place. The bits that were shifted out are put in the "out" register, if it is not void.

Examples

.function: example/0
    return
.end
    

Related instructions

bits, shl, ashl, ashr.