Will mine work?
Code:
Plain Asm Version:
ldrb r2, Latch
ldr r4, IOKeys
ldrh r4, [r4]
tst r4, #0xDF
movne r2, #0x0
bne LatchSet
cmp r2, #0x1
ldr r0, =0x121d9548
ldrb r1,[r0]
sub r1,#0x1
strb r1,[r0]
movne r2, #0x1
LatchSet:
strb r2, Latch
IOKeys:
.long 0x4000130
Latch:
.byte 0
.short 0
_
ldrb r2, Latch
ldr r4, IOKeys
ldrh r4, [r4]
tst r4, #0xEF
movne r2, #0x0
bne LatchSet
cmp r2, #0x1
ldr r0, =0x121d9548
ldrb r1,[r0]
add r1,#0x1
strb r1,[r0]
movne r2, #0x1
LatchSet:
strb r2, Latch
IOKeys:
.long 0x4000130
Latch:
.byte 0
.short 0