Addressing Mode Wannachai Wannasawade Department of Computer Education

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

1
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Objectives: Generate and describe sequences. Vocabulary:
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
Bright Futures Guidelines Priorities and Screening Tables
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
Instruction Set of 8086 Engr. M.Zakir Shaikh
Block Diagram of Intel 8086 Engr.M.Zakir Shaikh
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Judul Mata Kuliah Judul Pokok Bahasan Set Instruksi dan Format Intruksi.
Clock will move after 1 minute
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Registers of the 8086/ /2002 JNM.
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
EZ-COURSEWARE State-of-the-Art Teaching Tools From AMS Teaching Tomorrow’s Technology Today.
ACOE2511 Assembly Language Arithmetic and Logic Instructions.
80x86 Instruction Set Dr. Qiang Lin.
Introduction to Assembly Here we have a brief introduction to IBM PC Assembly Language –CISC instruction set –Special purpose register set –8 and 16 bit.
Gursharan Singh Tatla 21-Nov-20101www.eazynotes.com.
8086 : INSTRUCTION SET By, Pramod Sunagar Assistant Professor
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 5 Arithmetic and Logic Instructions.
9-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL x86 Instructions Part.
Microcomputer & Interfacing Lecture 3
Arithmetic and Logic Instructions
MOV Instruction MOV destination,source  MOV AX,BX  MOV SUM,EAX  MOV EDX,ARRAY[EBX][ESI]  MOV CL,5  MOV DL,[BX]
Internal Programming Architecture or Model
Chapter Nov-2010
Today we are going to discuss about,
Instruksi Set Prosesor 8088
Microprocessor Systems Design I
EE3541 Introduction to Microprocessors
Machine control instruction
INSTRUCTION SET.
Assembly Language Programming Part 2
Chapter 3 Addressing Modes
CS 301 Fall 2002 Assembly Instructions
4.4 Bit Manipulation Instructions
Data Addressing Modes • MOV AX,BX; This instruction transfers the word contents of the source-register(BX) into the destination register(AX). • The source.
32-bit instruction mode(80386-Pentium 4 only)
Chapter 5 Arithmetic and Logic Instructions
CNET 315 Microprocessor & Assembly Language
Presentation transcript:

Addressing Mode Wannachai Wannasawade Department of Computer Education Faculty of Technical Education, KMITNB.

Addressing Mode ในการพัฒนาโปรแกรมต่าง ๆ มีการอ้างถึงตำแหน่งของข้อมูล ตามที่มีในคำสั่งของไมโครโพรเซสเซอร์ ซึ่งมีหลายวิธีในการติดต่อ ดังนั้นสิ่งที่จะต้องเรียนรู้คือ Addressing Mode หรือวิธีการอ้างตำแหน่ง วิธีการอ้างตำแหน่งแบ่งได้ 3 แบบคือ Data Addressing Mode Program Memory Addressing Mode Stack Memory Addressing Mode

Data Addressing Mode Register addressing Immediate addressing Direct addressing Register indirect address Base-plus-index addressing Register relative addressing Base relative-plus-index addressing Scaled-index address

Data Addressing Mode Register Addressing Transfer byte or word from source register or memory location to destination register or memory location

Data Addressing Mode MOV BX,CX

Data Addressing Mode Immediate Addressing Transfer source immediate byte or word of data into the destination register or memory location

Data Addressing Mode MOV EAX,13456H

Data Addressing Mode Direct Addressing Moves byte or word between a memory location and register Direct Addressing move between memory location and AL,AX or EAX Displacement Addressing applies to almost any instruction in the instruction set

Data Addressing Mode

Data Addressing Mode MOV AL,[1234H]

Data Addressing Mode Register Indirect Addressing Transfer byte or word between register and memory location address by index or base register

Data Addressing Mode MOV AX,[BX]

Data Addressing Mode Base-Plus-Index Addressing Transfer byte or word between register and memory location address by base register (BX or BP) plus index register (DI or SI)

Data Addressing Mode MOV DX,[BX+DI]

Data Addressing Mode Register-Relative Addressing Moves byte or word between register and memory location address by index or base register plus displacement

Data Addressing Mode MOV AX,[BX+1000H]

Data Addressing Mode Base Relative-Plus-Index Addressing Transfer byte or word between register and memory location address by base register and index register plus displacement

Data Addressing Mode MOV AX,[BX+SI+1000H]

Data Addressing Mode Scale-Index Addressing Available 80386-Pentium used second register of pair of register is modified by the scale factor of 2X, 4X or 8X to generate the operand memory address

Program Memory Addressing Mode Used with the JMP and CALL instruction มีใช้งาน 3 แบบคือ Direct Program Memory Addressing Relative Program Memory Addressing Indirect Program Memory Addressing

Direct Program Memory Addressing What many early microprocessors used for all jumps and calls and also used in high-level languages. For example, JMP [10000H] Opcode Offset(low) Offset(High) Segment(high) Segment(low) E A 0 0 1 0 Used in intersegment jumps or often called far jump

Relative Program Memory Addressing Not available in all early microprocessors, but available to some family of microprocessors. Relative means relative to instruction Pointer (IP) used in short jump or call (+127 and -128 byte from next instruction) and near jump or call (64K bytes)

Indirect Program Memory Addressing Allows several forms of program indirect memory addressing for JMP and CALL. This type of jump is sometimes called indirect-indirect or double-indirect jump Examples of indirect program memory addressing JMP AX JMP CX JMP NEAR PTR [BX] JMP TABLE [BX] JMP ECX

Stack Memory Addressing Mode The stack plays an importance role in all microprocessor. It holds data temporarily and stores return address of procedures. Used by PUSH and POP that maintained by two register Stack Pointer register (SP or ESP) Stack Segment register (SS)

Stack Memory Addressing Mode PUSH and POP a) PUSH BX b) POP CX

Instruction Set เป็นกลุ่มคำสั่งที่ไมโครโพรเซสเซอร์รู้จักและเข้าใจ ซึ่งสามารถแบ่งเป็นกลุ่มต่าง ๆ ได้ดังนี้ Data Movement Instructions Arithmetic and Logic Instructions Program Control Instructions

Data Movement Instructions MOV Instruction Opcode 1-2 bytes MOD-REG-R/M 0-1 bytes Displacement 0-1 bytes Immediate 0-2 bytes 16 bits Instruction mode Address size 0-1 bytes Operand size 0-1 bytes Opcode 1-2 bytes MOD-REG-R/M 0-1 bytes Scaled-index 0-1 bytes Displacement 0-4 bytes Immediate 0-4 bytes 32 bits Instruction mode (80386,80486 and Pentium)

Data Movement Instructions PUSH and POP Load-Effective Address LEA LDS LES LFS LGS LSS String Data Transfer LODS STOS MOVS INS OUTS XCHG LAHF and SAHF XLAT IN and OUT

Data Movement Instructions MOVSX and MOVZX BSWAP CMOV Segment Override Prefix

Arithmetic and Logic Instructions Addition Register Addition Immediate Addition Memory to Register Addition Array Addition Increment Addition Addition with Carry

Arithmetic and Logic Instructions Subtraction Register Subtraction Immediate Subtraction Decrement Subtraction Subtract with Borrow

Arithmetic and Logic Instructions Comparison CMP (Compare) CMPXCHG (Compare and Exchange) used in 80486 - Pentium

Arithmetic and Logic Instructions Multiplication 8 bit Multiplication 16 bit Multiplication Special Immediate 16 bit Multiplication 32 bit Multiplication

Arithmetic and Logic Instructions Division 8 bit Division 16 bit Division 32 bit Division

Arithmetic and Logic Instructions BCD and ASCII BCD Arithmetic DAA DAS ASCII Arithmetic AAA AAD AAM AAS

Arithmetic and Logic Instructions Basic Logic AND OR XOR TEST and Bit Test NOT and NEG

Arithmetic and Logic Instructions Shift SHL SHR SAR SAL SHLD SHRD

Arithmetic and Logic Instructions Rotate ROL ROR RCL RCR

Arithmetic and Logic Instructions Bit Scan Instruction BSF BSR String Comparisons SCAS CMPS

Program Comtrol Instructions Jump Group Unconditional Jump (JMP) Short Jump Near Jump Far Jump Jumps with Register Operands Indirect Jumps Using Index

Program Comtrol Instructions Jump Group Conditional Jump and Condition Sets JA JAE JB JBE JC JE or JZ JG JGE JL JLE JNC JNE or JNZ JNO JNS JNP or JPO JO JP or JPE JS JCXZ JECXZ LOOP Condition LOOPs

Program Comtrol Instructions Procedures CALL Near CALL Far CALL CALL with Register Operands CALL with Indirect Memory Address RET

Program Comtrol Instructions Other Instructions Interrupt Instructions INT X IRET/IRETD WAIT HLT NOP

Program Comtrol Instructions Other Instructions LOCK Prefix ESC BOUND ENTER and LEAVE