Assembly MASM Dealing with Negative Integers

前端 未结 2 1018
孤独总比滥情好
孤独总比滥情好 2021-01-22 02:31

I was instructed to write a program in assembly that will carry out the following arithmetic:

((A + B) / C) * ((D - A) + E)

I\'ve succeeded in doing this when n

2条回答
  •  情书的邮戳
    2021-01-22 03:10

    On a twos complement machine, add and sub operations are actually the same for signed and unsigned quantities, so those parts of your program don't need to change. There are specific instructions for signed division and multiplication, so make sure the functions use those (or just use them directly).

提交回复
热议问题