Reverse numbers in a variable [closed]

一笑奈何 提交于 2021-02-05 09:27:07

问题


I have to reverse 20 numbers in a variable (src) and put te result in another variable (dst) in ARM 7 but I can't do it. I have src = 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4 and I want that dst = 4,3,2,1,8,7,6,5,4,3,2,1,8,7,6,5,4,3,2,1. Could someone help me please ? Here is my code:

        AREA TP2, CODE, READONLY
        ENTRY

start
        LDR R0, =src
        LDR R1, =dst
        MOV R2, #20 

reverse_function

end_reverse function

        AREA data, DATA, READWRITE
src     DCD 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4
dst     DCD 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
        END

来源:https://stackoverflow.com/questions/65842571/reverse-numbers-in-a-variable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!