.global main .data Var1: .word 0E000ED88h, 01h, 02h, 03h, 04h, 05h, 06h, 07h ;put your variables here .thumb ; use thumb, UAL syntax .text ; set memory location to flash main: b Ldr_ex Mov_ex: mov R0, #23h movs R1, R0 ; APSR (Z flag) affected due to s suffix mov R0, #0 mrs R1, apsr ; read apsr movs R2, #0 ;mov r4, #1234 movw R6, #1234h ;way to load 32 bit value in a register movt R6, #8765h mvn R2, R1 vmov S0, r7 ; Floating point instructions Project propoerties ; Compiler optons->processor option-> FP support ;ldr r0, var1 ; Observe the encoding of this instruction movw R0, #0 movt R0, #2000h ldr R1, [R0] movt R1, #00 ; Enable FPU: 0f0h, Disable FPU: 00h str R1, [R0] vmov S0, R1 vmov.f32 S1, #1.0 here_m: b here_m Ldr_ex: ldr r0, Var1_a ; Load address of label cpacr in R0 ;movw r0, #0 ;movt r0, #2000h ldr R1,[R0, #04h] ; Immediate offset ldr R2,[R0, #08h]! ; Immediate offset with writeback strb r2, [r0, #13h] ldr r0, Var1_a ; Restore R0 ;movw r0, #0 ;movt r0, #2000h vldr.32 s3, [r0, #0ch] ; Loading floating point register mov r2, #01 ldr r3, [r0, r2] ; register Offset str r0, [r0, r2, LSL #3] ;scaled register offset ldr r4, [r0], #04 ;post-index addressing mode movw r0, #0 ; load and store multiple movt r0, #2000h ldmia r0, {r1-r4} movw r0, #20h movt r0, #2000h stmdb r0!, {r1-r4} vldmia.64 r0, {D0-D1} movw r1, #8000h movt r1, #2000h msr msp, r1 here_l: b here_l Var1_a .field Var1, 32 .end