Chapter 6 - (๐ฃ๐บ ๐๐ฆ๐ง๐งโ) Flashcards
o Allows programmer to skip sections of program
- Jump (JMP)
o Allows programmer to make decisions based upon numerical tests
- Conditional jump
3 Unconditional Jumps
Short
Near
Far
๏ง 2-byte instruction that allows jumps within +127 and -128 bytes from the address
o Short jump
๏ง 3-byte instruction that allows jumps within +32k bytes from instruction
o Near jump
๏ง 5-byte instruction that allows jumps to any memory location within the real memory system
o Far jump
o Relative jumps
- Short Jump
o Moved with related software to any location in code segment without a change
- Short Jump
๏ง Follows the opcode
o Distance/Displacement
o Similar to short jump, only farther
- Near Jump
o Also relocatable
- Near Jump
o +- 2G in 80386
- Near Jump
๏ง Denotes relocatable jump address
o Letter R
o Obtains a new segment and offset address to accomplish the jump
- Far Jump
๏ง Obtain a far jump from label
o Far label
๏ง Appear in programs that contain more than one program file
o External labels
o Sets up instruction as indirect jump
o Address of jump is in register
- Jumps with Register Operands
o Double indirect jump
Indirect Jumps Using an Index
o Always short jumps
- Conditional jump
Conditional jump tests the following flag bits
๏ง Sign
๏ง Zero
๏ง Carry
๏ง Parity
๏ง Overflow
o Conditions tested by conditional jumps
- Conditional Set Instructions
o Set byte to 01H or clear a byte to 00H
- Conditional Set Instructions
- Combination of decrement CX and JNZ conditional jump
LOOP
Two Conditional LOOPs
LOOPE and LOOPNE