Et sinon, quelqu'un saurai pourquoi ceci me provoque une erreur de compilation :
Erreur donée par le compilateur :
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm: Assembler messages:
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:7: Error: invalid offset, target not word aligned (0x00000076)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:7: Error: invalid offset, value toobig (0x00000076)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:17: Error: invalid offset, target not word aligned (0x0000007E)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:17: Error: invalid offset, value too big (0x0000006E)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:31: Error: invalid offset, target not word aligned (0x0000007A)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:31: Error: invalid offset, value too big (0x00000056)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:77: Error: invalid offset, target not word aligned (0x00000076)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:77: Error: invalid offset, value too big (0x00000012)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:7: Error: invalid offset, target not word aligned (0x00000076)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:7: Error: invalid offset, value toobig (0x00000076)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:17: Error: invalid offset, target not word aligned (0x0000007E)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:17: Error: invalid offset, value too big (0x0000006E)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:31: Error: invalid offset, target not word aligned (0x0000007A)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:31: Error: invalid offset, value too big (0x00000056)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:77: Error: invalid offset, target not word aligned (0x00000076)
G:\Jeux\P\RH\Tests\Test Nuzlocke\KO_def.asm:77: Error: invalid offset, value too big (0x00000012)
Routine non compilée avec erreur
Code: [Sélectionner]
.thumb
.align 2
main:
push {r0-r7, lr}
ldr r5, nbre_pkm_equipe
ldrb r4, [r5]
mov r5, #0x0
mov r0, #0x0
verif_pv:
mov r1, #0x64
mov r0, r5
add r5, #0x1
mul r0, r1
ldr r1, addresse_PV
add r0, r0, r1
ldrh r0, [r0]
cmp r0, #0x0
beq delete
cmp r5, r4
beq fin_verif
b verif_pv
delete:
mov r0, #0x0
sub r7, r5, #0x1
ldr r6, addresse_equipe
mov r4, #0x5
sub r4, r4, r7
make_address:
cmp r7, #0x0
beq made_address
add r6, #0x64
sub r7, #0x1
b make_address
made_address:
add r7, r4, #0x0
add r4, r6, #0x0
add r4, #0x64
copie:
cmp r7, #0x0
beq suppression
add r0, r4, #0x0
add r1, r6, #0x0
mov r2, #0x64
swi #0xb
sub r7, #0x1
add r6, #0x64
add r4, #0x64
b copie
suppression:
mov r0, #0x6
mov r1, #0x0
mov r2, #0x0
mov r3, #0x0
mov r4, #0x0
suppression_boucle:
stmia r6!, {r1-r4}
sub r0, #0x1
cmp r0, #0x0
bne suppression_boucle
mov r7, r5
str r6, [r1]
ldr r5, nbre_pkm_equipe
ldrb r0, [r5]
sub r0, #0x1
strb r0, [r5]
mov r4, r0
sub r5, r7, #0x1
cmp r5, r4
beq fin_verif
b verif_pv
fin_verif:
pop {r0-r7, pc}
nbre_pkm_equipe: .word 0x020244E9
addresse_equipe: .word 0x020244EC
addresse_PV: .word 0x02024542
Avec comme seule modification : ".hword 0x0000" ajouté a la 91ème ligne. (4ème en partant de la fin)
Routine compilée sans erreur
.thumb
.align 2
main:
push {r0-r7, lr}
ldr r5, nbre_pkm_equipe
ldrb r4, [r5]
mov r5, #0x0
mov r0, #0x0
verif_pv:
mov r1, #0x64
mov r0, r5
add r5, #0x1
mul r0, r1
ldr r1, addresse_PV
add r0, r0, r1
ldrh r0, [r0]
cmp r0, #0x0
beq delete
cmp r5, r4
beq fin_verif
b verif_pv
delete:
mov r0, #0x0
sub r7, r5, #0x1
ldr r6, addresse_equipe
mov r4, #0x5
sub r4, r4, r7
make_address:
cmp r7, #0x0
beq made_address
add r6, #0x64
sub r7, #0x1
b make_address
made_address:
add r7, r4, #0x0
add r4, r6, #0x0
add r4, #0x64
copie:
cmp r7, #0x0
beq suppression
add r0, r4, #0x0
add r1, r6, #0x0
mov r2, #0x64
swi #0xb
sub r7, #0x1
add r6, #0x64
add r4, #0x64
b copie
suppression:
mov r0, #0x6
mov r1, #0x0
mov r2, #0x0
mov r3, #0x0
mov r4, #0x0
suppression_boucle:
stmia r6!, {r1-r4}
sub r0, #0x1
cmp r0, #0x0
bne suppression_boucle
mov r7, r5
str r6, [r1]
ldr r5, nbre_pkm_equipe
ldrb r0, [r5]
sub r0, #0x1
strb r0, [r5]
mov r4, r0
sub r5, r7, #0x1
cmp r5, r4
beq fin_verif
b verif_pv
fin_verif:
pop {r0-r7, pc}
.hword 0x0000
nbre_pkm_equipe: .word 0x020244E9
addresse_equipe: .word 0x020244EC
addresse_PV: .word 0x02024542
.align 2
main:
push {r0-r7, lr}
ldr r5, nbre_pkm_equipe
ldrb r4, [r5]
mov r5, #0x0
mov r0, #0x0
verif_pv:
mov r1, #0x64
mov r0, r5
add r5, #0x1
mul r0, r1
ldr r1, addresse_PV
add r0, r0, r1
ldrh r0, [r0]
cmp r0, #0x0
beq delete
cmp r5, r4
beq fin_verif
b verif_pv
delete:
mov r0, #0x0
sub r7, r5, #0x1
ldr r6, addresse_equipe
mov r4, #0x5
sub r4, r4, r7
make_address:
cmp r7, #0x0
beq made_address
add r6, #0x64
sub r7, #0x1
b make_address
made_address:
add r7, r4, #0x0
add r4, r6, #0x0
add r4, #0x64
copie:
cmp r7, #0x0
beq suppression
add r0, r4, #0x0
add r1, r6, #0x0
mov r2, #0x64
swi #0xb
sub r7, #0x1
add r6, #0x64
add r4, #0x64
b copie
suppression:
mov r0, #0x6
mov r1, #0x0
mov r2, #0x0
mov r3, #0x0
mov r4, #0x0
suppression_boucle:
stmia r6!, {r1-r4}
sub r0, #0x1
cmp r0, #0x0
bne suppression_boucle
mov r7, r5
str r6, [r1]
ldr r5, nbre_pkm_equipe
ldrb r0, [r5]
sub r0, #0x1
strb r0, [r5]
mov r4, r0
sub r5, r7, #0x1
cmp r5, r4
beq fin_verif
b verif_pv
fin_verif:
pop {r0-r7, pc}
.hword 0x0000
nbre_pkm_equipe: .word 0x020244E9
addresse_equipe: .word 0x020244EC
addresse_PV: .word 0x02024542