Posted: Sun Nov 04, 2012 9:46 am Post subject: some basic assembly help
I'm studying some assembly by myself and I can't figure out what jb and ja do.
I know that they work with the EFLAGS register but i don't really know how they change the Instruction Pointer.
Can someone explain this to me?
Thanks _________________
Okay well 'jb' and 'ja' are conditional jumps, that means only if a certain condition is true, then jump to the specified location. They are the unsigned versions (it jumps based on the value compared to which is treated as a positive number only) 'jl' and 'jg' would be the signed versions which would treat that compared to value as signed [so it could be either positive or negative])
Well how exactly they change the EIP, I'm not totally sure about that, but it does cause EIP to be changed ONLY when the condition is met 'jb' if its below, or 'ja' if its above!
You can't set the EIP register directly so we use jump instructions to do that for us. An unconditional jump 'jmp' will ALWAYS jump as there is no condition that has to be met for it to jump. It just will always make the jump.
would execute the code at address hello or not.
thank you.
anyways i found a very good x86 x64 reference that explains it all in detail.
here's the link:
http://siyobik.info.gf/main/reference
and this is also interesting:
http://zsmith.co/intel.html _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum