Code:
@Load latch
ldrb r2, Latch
@For keys pressed
ldr r4, IOKeys
ldrh r4, [r4]
@Checks if start is pressed
tst r4, #0x8
@If not, Disable latch for next time it's activated.
movne r2, #0x0
bne LatchSet
@Else, If Latch is Disabled, activate your code and activate latch.
cmp r2, #0x1
@Add your code here with ne
movne r2, #0x1
LatchSet:
strb r2, Latch
IOKeys:
.long 0x4000130
Latch:
.byte 0
.short 0
Haven't tested it or anything but here's an example of a latch (or how I understand it anyway). And yes, I did learn from the aimbot source.