Chapter_6_v1(2)

Chapter_6_v1(2) - UnconditionalTransfers JMP, CALL, RET...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Unconditional Transfers JMP, CALL, RET These instructions modify the EIP register to be: The displacement following the instruction (label), in the case of JMP and CALL; The address stored in the stack by the CALL instruction, in the case of RET. Ex: JMP Again CALL Delay RET
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unconditional Transfers Short jumps also called relative jumps allows displacement distance in the range -128 to 127. SHORT directive can be used to inform the assembler of its use. JMP SHORT AGAIN Near jumps are similar to short jumps except for the displacement distance. Range ±32K. NEAR directive is used to inform the assembler of its use. JMP NEAR NEXT
Background image of page 2
Unconditional Transfers The previous two forms of jumps are used in intra-segment type transfers. FAR jump is used for inter-segment transfers. In this case both the segment address and the offset are used. This jump allows the user to jump anywhere in memory. FAR directive is used to inform the assembler of its use. JMP FAR NEXT_SEGMENT_PLEASE
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unconditional Transfers Indirect jumps: Jumps with register operands: JMP AX Jumps using an index: JMP ARRAY[DI]
Background image of page 4
Conditional Transfers These instructions conditionally modify the EIP register to be one of two addresses defined as follows: An address or displacement following the instruction (label); The address of the instruction following the conditional jump. Ex: JE SUM SUB EAX,EBX . . SUM:
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Used with unsigned integers JA/JNBE – Jump if above – Z=0 and C=0 JAE/JNB – Jump if above or equal – C=0 JB/JNA – Jump if below – C=1 JBE/JNA – Jump if below or equal – Z=1 and C=1 CMP AL,BL JA NEXT MOV CL,0 . . NEXT:
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 31

Chapter_6_v1(2) - UnconditionalTransfers JMP, CALL, RET...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online