ASSEMBLY - how to do sum between two numbers(interval)

后端 未结 4 520
野的像风
野的像风 2021-01-26 03:45

Hey guys can you help? I dont know how to do sum between two numbers For example :

first number>1

second number>5

sum w

4条回答
  •  没有蜡笔的小新
    2021-01-26 04:16

    Here's the pseudo-code (up to you to translate to assembly):

    count = firstNumber
    endCount = secondNumber + 1
    total = 0
    while count != endCount
        total = total + count
        count = count + 1
    

提交回复
热议问题