eee410_lecture7 - EEE 410 Microprocessors I Fall 05/06...

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

View Full Document Right Arrow Icon
Fall 05/06 – Lecture Notes # 7 Outline of the Lecture Control transfer instructions CALL statement Subroutines Data Types and Data Definition C ONTROL TRANSFER INSTRUCTIONS FAR and NEAR : (given CS:IP) In NEAR the control is transferred within the current code segment (intrasegment). IP is changed. In FAR the control is transferred outside the current code segment (intersegment). Both CS and IP are changed. Conditional Jumps In the conditional jump, control is transferred to a new location if a certain condition is met. JC (jump if carry) [CF is checked], JNZ (jump if not zero) [ZF is checked]. Mnemonic Condition Tested “Jump if …” JA/JNBE (CF=0) and (ZF=0) above/not below nor equal JAE/JNB CF=0 above or equal/not below JB/JNAE CF=1 below/not above nor equal JBE/JNA (CF or ZF)=1 below or equal/not above JC CF=1 carry JE/JZ ZF=1 equal/zero JG/JNLE ((SF xor OF) or ZF) = 0 greater/not less nor equal JGE/JNL ((SF xor OF) = 0 greater or equal/not less JL/JNGE ((SF xor OF) = 1 less/not greater nor equal JLE/JNG ((SF xor OF) or ZF) = 1 less or equal/not greater JNC CF=0 not carry JNE/JNZ ZF=0 not equal/not zero JNO OF=0 not overflow JNP/JPO PF=0 not parity/parity odd JNS SF=0 not sign JO OF=1 overflow JP/JPE PF=1 parity/parity equal JS SF=1 sign Note: “above” and “below” refer to the relationship of two unsigned values; “greater” and “less” refer to the relationship of two signed values. Short Jumps All conditional jumps are short jumps. In a short jump the address of the target must be within –128 to +127 bytes of the memory A conditional jump is a two-byte instruction: one byte is the opcode of the J condition and the second value is a value between 00 to FF. In a backward jump the second byte is the 2’s complement of the
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/26/2011 for the course EEE 410 taught by Professor Hasandemirel during the Spring '10 term at Eastern Mediterranean University.

Page1 / 4

eee410_lecture7 - EEE 410 Microprocessors I Fall 05/06...

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

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