程序集x86中数组中整数的最长运行

时间:2018-12-05 22:06:46

标签: arrays assembly x86

我无法在x86汇编中的数组中找到最长的整数。我有一个要传递的数组以及数组的大小,我想我按逻辑做事,只是无法弄清楚最后的步骤。任何帮助表示赞赏。这是我到目前为止的代码:

def locateOnScreen(image, minSearchTime=0, **kwargs):
    """minSearchTime - amount of time in seconds to repeat taking
    screenshots and trying to locate a match.  The default of 0 performs
    a single search.
    """
    start = time.time()
    while True:
        try:
            screenshotIm = screenshot(region=None) # the locateAll() function must handle cropping to return accurate coordinates, so don't pass a region here.
            retVal = locate(image, screenshotIm, **kwargs)
            try:
                screenshotIm.fp.close()
            except AttributeError:
                # Screenshots on Windows won't have an fp since they came from
                # ImageGrab, not a file. Screenshots on Linux will have fp set
                # to None since the file has been unlinked
                pass
            if retVal or time.time() - start > minSearchTime:
                return retVal
        except ImageNotFoundException:
            if time.time() - start > minSearchTime:
                raise

有什么想法或指导吗?

0 个答案:

没有答案