This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

help about opcode

hello
i have an opcode of BNE branch which is 1AFFFFF9 and i want to know to which address go this branch i mean how i know what is the next address executed

Parents
  • yes i asked there but up till now i didn't know how can i determine the jump address and i ask here maybe i find a better answer

    take a look at this code

    000138: e92d40f0 stmdb sp!, {r4, r5, r6, r7, lr}
    00013c: e1a07000 mov r7, r0
    000140: e59f00bc ldr r0, [pc, #188] ; [000204]
    000144: e1a06001 mov r6, r1
    000148: e59f10b8 ldr r1, [pc, #184] ; [000208] "w"
    00014c: eb00033e bl 000e4c(33e)
    000150: e2505000 subs r5, r0, #0 ; 0x0
    000154: 0a000027 beq 0001f8(27) ; jump

    000158: e3560064 cmp r6, #100 ; 0x64 'd'
    00015c: 1a000008 bne 000184(8) ; jump
    000160: e59f40a4 ldr r4, [pc, #164]
    000164: e1a00004 mov r0, r4
    000168: eb000544 bl 001680(544)
    00016c: e1a02000 mov r2, r0
    000170: e1a00004 mov r0, r4
    000174: e3a01001 mov r1, #1 ; 0x1
    000178: e1a03005 mov r3, r5
    00017c: eb000339 bl 000e68(339)
    000180: ea000007 b 0001a4(7) ; jump

    000184: e59f4084 ldr r4, [pc, #132] ; [000210]

    look at this bne opcode
    00015c: 1a000008 bne 000184(8) ; jump
    how they determine the jump address 000184

Reply
  • yes i asked there but up till now i didn't know how can i determine the jump address and i ask here maybe i find a better answer

    take a look at this code

    000138: e92d40f0 stmdb sp!, {r4, r5, r6, r7, lr}
    00013c: e1a07000 mov r7, r0
    000140: e59f00bc ldr r0, [pc, #188] ; [000204]
    000144: e1a06001 mov r6, r1
    000148: e59f10b8 ldr r1, [pc, #184] ; [000208] "w"
    00014c: eb00033e bl 000e4c(33e)
    000150: e2505000 subs r5, r0, #0 ; 0x0
    000154: 0a000027 beq 0001f8(27) ; jump

    000158: e3560064 cmp r6, #100 ; 0x64 'd'
    00015c: 1a000008 bne 000184(8) ; jump
    000160: e59f40a4 ldr r4, [pc, #164]
    000164: e1a00004 mov r0, r4
    000168: eb000544 bl 001680(544)
    00016c: e1a02000 mov r2, r0
    000170: e1a00004 mov r0, r4
    000174: e3a01001 mov r1, #1 ; 0x1
    000178: e1a03005 mov r3, r5
    00017c: eb000339 bl 000e68(339)
    000180: ea000007 b 0001a4(7) ; jump

    000184: e59f4084 ldr r4, [pc, #132] ; [000210]

    look at this bne opcode
    00015c: 1a000008 bne 000184(8) ; jump
    how they determine the jump address 000184

Children