Chapter 6 - JEP 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
LOOPE
Loop while equal
Jumps if cx!=0 while an equal condition exists
Exits if condition is not equal or cx = 0
o LOOPE
o LOOPNE
Loop while not equal
Jumps if cx!=0 while a not-equal condition exists
Exits if condition is equal or if cx = 0
o LOOPNE
o Do not function when using Visual C++ inline assembler
- Dot commands
Two Dot commands
o .REPEAT-.UNTIL and .WHILE-.ENDW
o Causes all assembler generated statements to be listed
- .LISTALL
o Generates label @startup
- .STARTUP
o Used with a condition to begin the loop
- .WHILE
o Ends the loop
- .ENDW
- Series of instructions is repeated until some condition occurs
REPEAT-UNTIL Loops
o Defines start of loop
- .REPEAT
o End of loop which contains condition
- .UNTIL