This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我使用 sub.w 函数来查找 dst 和 src 之间的差异。 我的问题是如何将这些整数转换为其绝对值? 并将它们全部添加到单独的寄存器(R7)中
我的代码:
loop_mad_diff: sub.w mean_1,samples(R6) add.w samples(R6),R7 incd.w R6 cmp.w #2*n, R6 jlo loop_mad_diff
忽略最后三行。
为什么不使用 C、这一点很重要?
但是、如果您坚持:
要获得绝对值、请对该值求反并加1、然后将其加至寄存器。