Hi, im having problem assembling jcc jumps. I want to create a new code segment, and inside it generate(assemble) some code. Everything assemble()'s fine except jmp/jcc statements. I can't seem to make ida realize that the jumps should be generated inside specified segment and use it as cs selector.
eg.
I create segment size 0x1000 and class=CODE
code_1:00000000 ; Segment type: Pure code
code_1:00000000 code_1 segment at 0 private 'CODE' use32
code_1:00000000 assume cs:code_1
code_1:00000000 assume es:nothing, ss:nothing, ds:nothing, fs:nothing, gs:nothing
and call assemble() like this:
idaapi.assemble(0x8, 0, 0x8, True, 'jz 30h')
but get "Cannot reach destination from current location"
Any sugestions?







