def do_OP_RIGHT(vm):
    """
    >>> s = [b'abcdef', b'\\3']
    >>> do_OP_RIGHT(s, require_minimal=True)
    >>> print(s==[b'def'])
    True
    >>> s = [b'abcdef', b'\\0']
    >>> do_OP_RIGHT(s, require_minimal=False)
    >>> print(s==[b''])
    True
    """
    pos = vm.pop_nonnegative()
    if pos > 0:
        vm.append(vm.pop()[-pos:])
    else:
        vm.pop()
        vm.append(b'')