{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

JumpConTable4-3page145

JumpConTable4-3page145 - 80x86 INSTRUCTION SET 145 Table...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 80x86 INSTRUCTION SET 145 Table 4.3 Conditional Jump Instructions Mnemonic Condition Signed Operations JG/JNLE Greater/not less or equal ((SF O OF) + ZF) = 0 JGE/JNL Greater or equal/not less (SF O OF) = 0 JL/JNGE Less/not greater or equal (SF G OF) = l JLE/JNG Less or equal/not greater ((SF (SE OF) + ZF) = 1 J0 Overflow (OF = 1) JS Sign (SF = l) JNO Not overflow (OF = 0) INS Not sign (SF = O) Unsigned Operations JA/JNBE Above/not below or equal (CF 63 ZF) = O JAE/JNB Above or equal/not below (CF = O) JB/JNAE Below/not above or equal (CF = l) JBE/JNA Below or equal/not above (CF 65 ZF) = 1 Either JC Carry (CF = 1) JE/JZ Equal/zero (ZF = l) JP/JPE Parity/parity even (PF = l) INC Not carry (CF = 0) JNE/JNZ Not equal/not zero (ZF = 0) JNP/JPO Not parity/parity odd (PF = 0) Note that in this program we have used the name Al to represent the memory location in which the IN instruction is stored. Large programs are often made up of many smaller subprograms (subroutines) or procedures. When it is desired to execute one of these procedures, the CALL instruction is used. The CALL transfers control to the subprogram but also saves the return address on the stack.10 When the procedure finishes, it executes an RET instruction. This recovers the return address from the stack, allowing the calling program to resume from where it left off. (Chapters 4, 5, and 6 explore this programming concept in more detail.) Finally, the interrupt instructions transfer control to an interrupt service routine (ISR) whose address is set up in a special interrupt vector table in low memory. (These instruc— tions are covered in Section 4.3.) High-Level Language Instructions [Table 4.2(g)]. These instructions assist in the development of high-level languages. BOUND, for example, checks that the specified reg— ister is pointing within a predefined range of memory addresses. If not, an interrupt is gen— erated. ENTER and LEAVE are used to allow variables to be passed to a subroutine via the stack. 10The stack is a special area of memory used for storing temporary values and memory addresses. The stack operates in a last-in first—out manner; that is, the last item written to the stack becomes the first item read from the stack. For more details, see Using the Stack on page 142. ...
View Full Document

{[ snackBarMessage ]}