-
Artikel
ARM-ASM-Tutorial
can also use the “mvn” instruction directly, e.g.: both lines are identical and write the number 0xf807ffff into r0. The “movt” instruction. While supporting many common patterns, this does not allow arbitrary 32 bit numbers. One way to load any 32bit number is to split the number into two 16bit halves
6808 ldr r0, [r1, #0] 80001b4: f020 000f bic.w r0, r0, #15 80001b8: f040 0002 orr.w r0, r0, #2 80001bc: 6008 str r0, [r1, #0] 80001be: 4770 bx lr 80001c0: 20000404 .word 0x20000404 80001c4: 20000400 .word 0x20000400 80001c8: 08000192 .word 0x08000192 80001cc: 40010810 .word 0x40010810 80001d0: 40021018