.text
.align 2
.thumb
Matriz:
mov r3, #0x0
ldr r1, Contador2
str r3, [r1]
ldr r1, moves
str r3, [r1]
add r1, #0x4
str r3, [r1]
add r1, #0x4
str r3, [r1]
add r1, #0x4
str r3, [r1]
LDR R1, movesettable
ADD R1, R6, R1
LDR r2, [R1]
LDR r3, var
STR r2, [r3]
Start:
mov r2, r10
LDR r3, var
LDR r3, [r3]
LDRB r3, [r3, #0x2]
CMP r3, r2
BLS Frente
ldr r1, var
ldr r2, [r1]
sub r2, #0x3
str r2, [r1]
B Compare
Frente:
LDR r2, var
LDR r2, [r2]
ADD r2, #0x3
LDR r3, var
STR r2, [r3]
B Start
Compare:
LDR r2, Contador
LDRB r2, [r2]
CMP r2, #0x4
BEQ end
LDR r2, var
LDR r2, [r2]
LDRH r2, [r2]
LDR r3, moves
LDRH r3, [r3]
LDR R7, Contador2
LDRB R7, [R7]
ADD r3, R7, r3
CMP r2, r3
BEQ Traz
LDR R7, Contador2
LDRB R7, [R7]
ADD R7, #0x3
LDR r2, Contador2
STRH R7, [r2]
LDR R7, Contador2
LDRB R7, [R7]
CMP R7, #0xC
Blo Compare
LDR R7, Contador2
MOV r2, #0x0
STRB r2, [R7]
B Insert
end:
MOV r3, #0x0
LDR r2, Contador
STR r3, [r2]
ldr r1, var
ldr r2, [r1]
add r2, #0x3
str r2, [r1]
LDR R1, movesettable
ADD R1, R6, R1
LDR r2, [R1]
ldr r1, var
ldr r3, [r1]
cmp r3, r2
bhs end1
str r2, [r1]
end1:
mov r2, #0x0
mov r3, #0x0
mov r4, #0x0
mov r7, #0x0
LDR R1, Go
bx r1
Traz:
LDR r1, var
LDR r2, [r1]
sub r2, #0x3
str r2, [r1]
B Compare
Insert:
LDR R7, Contador
LDRB R7, [R7]
MOV r2, #0x3
MUL R7, r2, R7
LDR r3, moves
ADD r3, R7, r3
LDR r2, var
LDR r2, [r2]
LDRB r2, [r2]
STRB r2, [r3]
LDR r2, var
LDR r2, [r2]
LDRB r2, [r2, #0x1]
STRB r2, [r3, #0x1]
LDR r2, var
LDR r2, [r2]
LDRB R2, [R2, #0x2]
STRB R2, [R3, #0x2]
LDR R7, Contador
LDRH R7, [R7]
ADD R7, #0x1
LDR r2, Contador
STRB R7, [r2]
b Traz
.align 2
var: .word 0x02FF7d24
Contador2: .word 0x02FF7D2C
moves: .word 0x02FF7D50
movesettable: .word 0x08XXXXXX
Contador: .word 0x02FF7D28
Go: .word 0xJAMBO51ROUTINEOFFSET