The JUMP GROUP Unconditional Jump (JMP).

Slides:



Advertisements
Similar presentations
Programming 8086 – Part IV Stacks, Macros
Advertisements

Lecture By SHERY KHAN Assembly Language Lecture By SHERY KHAN
Assembly Programming Notes for Practical2 Munaf Sheikh
Micro-Computer Applications: Jumping and Loop Dr. Eng. Amr T. Abdel-Hamid ELECT 707 Fall 2011.
ACOE2511 Assembly Language Arithmetic and Logic Instructions.
Procedures and Stacks. Outline Stack organization PUSH and POP instructions Defining and Calling procedures.
Irvine, Kip R. Assembly Language For Intel-Based Computers TYPE and SIZE Operators TYPE –returns the size, in bytes of a single element of a data label.
Lect 3: Instruction Set and Addressing Modes. 386 Instruction Set (3.4) –Basic Instruction Set : 8086/8088 instruction set –Extended Instruction Set :
Handout 2 Digital System Engineering (EE-390)
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
Target Processor Directives , When using.386, the program can only run on 386 and above processors.
80x86 Processor Architecture
Lect 4: Instruction Set and Addressing Modes. 386 Instruction Set (3.4)  Basic Instruction Set : 8086/8088 instruction set  Extended Instruction Set.
Microprocessor Programming II
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Click to add Title Comunicación y Gerencia Click To add Subtitle Click to add Text Fundamentals of Assembly Language.
1 IKI10230 Pengantar Organisasi Komputer Kuliah no. 06: Control Structures Sumber: 1. Paul Carter, PC Assembly Language 2. Hamacher. Computer Organization,
Program Control Instructions
Microprocessor Programming II To discuss more complicated programming techniques Flag control instructions Compare and jump Subroutines Loop and string.
Review of Assembly language. Recalling main concepts.
Addressing Modes. Addressing Mode The data is referred as operand. The operands may be contained in registers, memory or I/O ports, within the instruction.
2/20/2016CAP 2211 Flow Control Instructions. 2/20/2016CAP 2212 Transfer of Control Flow control instructions are used to control the flow of a program.
MOV Instruction MOV destination,source  MOV AX,BX  MOV SUM,EAX  MOV EDX,ARRAY[EBX][ESI]  MOV CL,5  MOV DL,[BX]
Jumps, Loops and Branching. Unconditional Jumps Transfer the control flow of the program to a specified instruction, other than the next instruction in.
Program Control Instructions Prima Dewi Purnamasari Microprocessor Department of Electrical Engineering University of Indonesia.
1 Using the Assembler Chapter – 4(A). 2 Exchanging Two Variables title Exchange Two Variables (Exchange.asm).model small.stack 100h.data value1 db 0Ah.
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Instruction set Architecture
Data Transfers, Addressing, and Arithmetic
Microprocessor Systems Design I
Today we are going to discuss about,
Instruksi Set Prosesor 8088
ADDRESSING MODES.
Microprocessor and Assembly Language
EE3541 Introduction to Microprocessors
EE3541 Introduction to Microprocessors
Assembly IA-32.
INSTRUCTION SET.
Assembly Language Programming Part 2
ADDRESSING MODES.
Microprocessor and Assembly Language
Processor Processor characterized by register set (state variables)
(The Stack and Procedures)
Assembly Lang. – Intel 8086 Addressing modes – 1
Chapter 3 Addressing Modes
Morgan Kaufmann Publishers Computer Organization and Assembly Language
CS 301 Fall 2002 Control Structures
4.4 Bit Manipulation Instructions
Introduction to Assembly Language
Data Addressing Modes • MOV AX,BX; This instruction transfers the word contents of the source-register(BX) into the destination register(AX). • The source.
ارايه دهنده : حسن عسكرزاده
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
Lecture 1 Instruction set of 8086 Лектор: Люличева И.А. 1.
Symbolic Instruction and Addressing
(Array and Addressing Modes)
(The Stack and Procedures)
Symbolic Instruction and Addressing
(Array and Addressing Modes)
Flow Control Instructions
Morgan Kaufmann Publishers Computer Organization and Assembly Language
CNET 315 Microprocessor & Assembly Language
Chapter 6 –Symbolic Instruction and Addressing
(The Stack and Procedures)
CS-401 Computer Architecture and Assembly Language Programming
Chapter 8: Instruction Set 8086 CPU Architecture
(The Stack and Procedures)
(Array and Addressing Modes)
Procedures and Macros.
Presentation transcript:

The JUMP GROUP Unconditional Jump (JMP). a. Short Jump (relative jump). They can be moved along with their related software, to any location in the current code segment without a change. JMP SHORT NEXT JMP NEXT NEXT: 8-bit displacement b. Near Jump. it is similar to the short jump, except that the distance is farther. JMP START START: 16-bit displacement

c. Far Jump. obtains a new segment and offset address to accomplish the jump.(80286-P4). JMP FAR PTR START d. Jump with Register Operands. JMP AX e. Indirect Jump using an Index. JMP TABLE[SI]

2. Conditional Jump. JA NEXT jump if above JB NEXT jump if below JS NRXT jump if sign(-ve) LOOP. It is combination of a decrement CX and the JNZ. CLD MOV CX,200 MOV DI,F3A6H N1: IN AX,P8 STOSW LOOP N1 INT 5

Conditional LOOP. LOOPNE NEXT LOOPZ NEXT

PROCEDURES Near CALL. CALL SUM SUM:16-bit displacement Far CALL. CALL SUB SUB:32-bit displacement CALL with Register Operand. CALL BX CALL DS ,SS,CS, or ES RET. RET

0000 CALL 0FFF 0003 ADD AX,BX ADD,AX,AX 1002 ADD BX,10 AND AX,BX RET Memory 0000 CALL 0FFF 0003 ADD AX,BX ADD,AX,AX 1002 ADD BX,10 AND AX,BX RET AFFFF 00 Stack AFFFE SP AFFFD 03 11002 PROCEDURE 11001 11000 10003 SP before CALL=FFFF SS before CALL=A000 IP before CALL=0003 CS=1000 10002 0F 10001 FF 10000 CALL