帮助找到arraymax元素? [英] Help finding arraymax element?

查看:91
本文介绍了帮助找到arraymax元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何返回SWORD数组的最大数量



给定:ESI保存此数组的基数,EBX保存数组中的元素数。

返回:AX有最大值



这是我到目前为止:



How do I return the maximum number of a SWORD array

Given: ESI holds the base of this array, and EBX holds the number of elements in the array.
Returns: AX has the maximum

This is what I have so far:

ArrayMax PROC
    L1:     cmp ax, [esi]
            JL  L2      ;ax<[esi]
        add esi, TYPE array
        loop L1
    L2:     mov ax, [esi]
        add esi, TYPE array
        loop L1

ret AX

ArrayMax ENDP









我关心循环情况和逻辑。





I'm concerned with the looping situation, and the logic.

推荐答案

这篇关于帮助找到arraymax元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆