MantisBT - Cheat Engine
View Issue Details
0000011Cheat Enginepublic2007-09-13 06:552008-08-27 13:19
Assigned To 
PlatformOSOS Version
Summary0000011: Short/Long jumps in Auto-assembler
DescriptionWhen using scripts like:


cmp byte ptr [cave],0
je end
dec word ptr [esi+edx*2]
lea eax,[esi+edx*2]
jmp back

Cheat Engine will automatically use a LONG JUMP where "je end" is. Since 'end' is a label inside the cave, the jump should be a short one ;)
TagsNo tags attached.
related to 0000054confirmed  CE 5.4.2 - Additional NOPs after conditional jump 
Attached Files

Dark Byte   
2007-09-14 06:15   
(Last edited: 2007-09-14 06:16)
je end is actually a short jump
I think you mean the fill code thats placed between the short jump and the next instruction.
That is needed because at the time of assembling it isn't yet known if the total number of instructions between end and the jump is bigger than 128 bytes or not. (If it's bigger, it has to be a long jump, and it can't find out if the size is bigger if there are other jumps in between that can also change size. That it is in the same cave doesn't explicitly mean it's always a short jump)

Anyhow, the delay of the fill code takes up arround 0.00000000016 seconds on a 3GHz cpu

Dark Byte   
2008-08-27 13:19   
Minor update on this one, implemented the short and long override for jumps. So if you know it's going to be a short jump, you can do "je short end"

Issue History
2007-09-13 06:55SunBeamNew Issue
2007-09-14 06:05Dark ByteStatusnew => assigned
2007-09-14 06:05Dark ByteAssigned To => Dark Byte
2007-09-14 06:15Dark ByteNote Added: 0000015
2007-09-14 06:15Dark ByteStatusassigned => confirmed
2007-09-14 06:16Dark ByteNote Edited: 0000015
2007-09-14 06:23Dark ByteAssigned ToDark Byte =>
2008-07-14 02:34Dark ByteRelationship addedrelated to 0000054
2008-08-27 13:19Dark ByteNote Added: 0000119