def do_OP_SUBSTR(vm):
    """
    >>> s = [b'abcdef', b'', b'']
    >>> do_OP_SUBSTR(s, require_minimal=True)
    >>> print(s)
    [b'de']
    """
    pos = vm.pop_nonnegative()
    length = vm.pop_nonnegative()
    vm.append(vm.pop()[length:length + pos])
