[font="Courier New"]load_compare_RAM; ldr r0, = 0xE0680003 ; constant to be compared with ldr r0, [pc, #0x14] ; get the constant at [pc + 20d] = 0xE0680003; ldr r1, = 0x70001234 ; RAM addr ldr r1, [pc, #0x14] ; get the constant at [pc + 20d] = 0x70001234. This is the RAM addr ldr r2, [r1, #0] ; offsset = 0. Read RAM CMP r0, r2 ; BEQ eq_cmp ; jump to next block if Zneq_cmp B next_block1eq_cmp B next_block2 DCD 0xE0680003 ; DCD = .word DCD 0x70001234 ; DCD = .wordnext_block1 ; next block1 of codes herenext_block2 ; next block2 of codes here[/font]; #############################; the 2 commented lines are the pseudo instructions. If you enable them, you do not; need the line below each of them. In this case, you would also not need the 2 DCD lines.;; The active codes above are a manual way of creating a literal pool (of constants). If you use; the pseudo-instr, you let the assembler do all the work for you.;; This web page removes all my nice spaces in the assembly codes and compresses them.
ldr r1, =(SBMR)--> This code will not read a RAM/Peripheral register. The parenthesis is treated by the assembler to contain an equation of sorts that eventually results to a constant. Thus, this code boils down to ldr, r1, = constant.See my example and study it. Also read the Assembly instruction sets manual from ARM. The books by Sloss and Hohl are very good place to start with.