带有手臂组件和标点符号去除功能的倒弦

时间:2018-10-01 04:28:15

标签: assembly arm

您如何A)颠倒字符串,b)拆下手臂组件中的标点符号和空格 当前代码:

        AREA, Program2, CODE, READONLY
        ENTRY

        ADR r1, source ;r1 points to the address i want to read/referencing
        ADR r2, =0x40000000
L1      LDRB r3, [r1], #1 ;brackets around a register is like dereferencing a pointer, operand is at the memory location pointed to by r1, not actually at r1, after that one byte field is loaded into r3, r1 will then be incremented by 1 (what the #1 is)
        STRB r3, [r2], #1; [] is indirection operator
        CMP r3, #0 ;compare whats in r3 to a 0
        BEQ stop ;if not equal unconditionally branch to L1 ? B  L1
        BNE L1

Stop    b       stop            

source  stingOne    DCB  “In User mode or System mode, if you attempt to read the SPSR, ”
        stringTwo   DCB  “you will get an unpredictable value back, meaning the data cannot “
        stringThree DCB  “be used in any further operations.”, 0

        END

0 个答案:

没有答案