Use ## to create sections (Learn more)
ldr r0, =GPIOA
ldr r1, [r0, #0x400] @ r1 = GPIOA_DIR
bic r2, r1, #(1<<1) @ A1 = input
str r2, [r0, #0x400] @ write back direction
ldr r2, [r0, #4*(1<<1)] @ read A1
str r1, [r0, #0x400] @ write back original GPIOA_DIR
ands r2, r2, #(1<<1) @ test A1 <--------Does this line look like a correct test?
beq immediate @ boot immediately if unset
mov r0, #0x5000000 /* Approximately 7 seconds */
1: subs r0, r0, #1 /* just to prove we are running */
b boot_of /* branch to OF */
Share the private access URL responsibly.
Anyone will be able to find and view this paste. Google will index it.
With great power comes great responsibility.Pastie wisely.