1 ASSEMBLING THE "INC" INSTRUCTION INSTRUCTIONOPERATION CODE INC AX40h INC CX41h INC DX42h 4h _h INC AX0100 0000 INC CX0100 0001 INC DX0100 0010 I R.

Slides:



Advertisements
Similar presentations
There are two types of addressing schemes:
Advertisements

COMP 2003: Assembly Language and Digital Logic
1 x86’s instruction sets. 2 Instruction Set Classification  Transfer Move  Arithmetic Add / Subtract Mul / Div, etc.  Control Jump Call / Return, etc.
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Department of Computer Science and Software Engineering
6-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Intel 8088 Addressing modes.
CM404.12TO131 Name : C. S. Manjula, Grad IETE Designation : Lab Mechanic Branch: Computer Engineering Institute: S.P.W. Polytechnic, Tirupati, Semester:
Lect 3: Instruction Set and Addressing Modes. 386 Instruction Set (3.4) –Basic Instruction Set : 8086/8088 instruction set –Extended Instruction Set :
80x86 Instruction Set Dr. Qiang Lin.
Azir ALIU 1 What is an assembly language?. Azir ALIU 2 Inside the CPU.
Handout 2 Digital System Engineering (EE-390)
Stack Memory H H FFFFF H FFFFE H SS 0105 SP 0008 TOS BOS BOS = FFFF = 1104F H H 1104F H.
Data Movement Instructions
Addressing modes – 1 The way in which an operand is specified is called the Address Mode.
The 8086 Assembly Programming Data Allocation & Addressing Modes
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
Princess Sumaya University
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2013 Lecture 4: 80386DX memory, addressing.
Lect 4: Instruction Set and Addressing Modes. 386 Instruction Set (3.4)  Basic Instruction Set : 8086/8088 instruction set  Extended Instruction Set.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 4 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Addressing Modes of 8086 Processor Ammar Anwar Khan Electrical Engineer King Saud University Riyadh Saudi Arabia.
Click to add Title Comunicación y Gerencia Click To add Subtitle Click to add Text Fundamentals of Assembly Language.
ECE291 Computer Engineering II Lecture 3 Josh Potts University of Illinois at Urbana- Champaign.
University of Tehran 1 Microprocessor System Design Omid Fatemi Machine Language Programming
3.4 Addressing modes Specify the operand to be used. To generate an address, a segment register is used also. Immediate addressing: the operand is a number.
8086/8088 Instruction Set, Machine Codes and Addressing Modes.
Assembly Language Data Movement Instructions. MOV Instruction Move source operand to destination mov destination, source The source and destination are.
Intel MP Organization. Registers - storage locations found inside the processor for temporary storage of data 1- Data Registers (16-bit) AX, BX, CX, DX.
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
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
Presentation on Real Mode Memory Addressing
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Introduction to 8086 Microprocessor
COURSE OUTCOMES OF MICROPROCESSOR AND PROGRAMMING
16.317: Microprocessor System Design I
Instruksi Set Prosesor 8088
ADDRESSING MODES.
Microprocessor and Assembly Language
Assembly IA-32.
Assembly Language Programming Part 2
ADDRESSING MODES.
Assembly Lang. – Intel 8086 Addressing modes – 1
Morgan Kaufmann Publishers Computer Organization and Assembly Language
INSTRUCTION SET OF 8086 PAWAN KUMAR SINGH.
Microprocessor and Assembly Language
Arithmetic Instructions
Symbolic Instruction and Addressing
X86’s instruction sets.
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
8086 MICROPROCESSOR PROGRAMMING – INTEGER INSTRUCTIONS AND COMPUTATIONS Amar Saraswat.
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
Morgan Kaufmann Publishers Computer Organization and Assembly Language
32-bit instruction mode(80386-Pentium 4 only)
Symbolic Instruction and Addressing
(Array and Addressing Modes)
Symbolic Instruction and Addressing
(Array and Addressing Modes)
CNET 315 Microprocessor & Assembly Language
Lecture 06 Programming language.
University of Gujrat Department of Computer Science
Chapter 6 –Symbolic Instruction and Addressing
CSC 497/583 Advanced Topics in Computer Security
(The Stack and Procedures)
(Array and Addressing Modes)
Presentation transcript:

1 ASSEMBLING THE "INC" INSTRUCTION INSTRUCTIONOPERATION CODE INC AX40h INC CX41h INC DX42h 4h _h INC AX INC CX INC DX I R

2 ASSEMBLING THE "INC" INSTRUCTION 16-Bit Register Designations AX000SP100 CX001BP101 DX010SI110 BX011DI111 The formal description of the INC instruction is: reg reg = > 111

3 ASSEMBLING THE ”DEC" INSTRUCTION The formal description of the DEC instruction decrement a register by 1 is: regreg = > 111 so DEC AX is 48, DEC CX is 49, etc.

4 ASSEMBLING THE ”MOV" INSTRUCTION MOV destination, immediate value MOV AX,immed. B8h MOV CX,immed. B9h MOV DX,immed. BAh MOV BX,immed. BBh MOV SP,immed. BCh MOV BP,immed. BDh MOV SI,immed. BEh MOV DI,immed. BFh I R

5 ASSEMBLING THE ”MOV" INSTRUCTION MOV destination, immediate value The formal description of MOV immediate is: w reg data data if w=1 Example: MOV AX,FF00 = B8 00 FF w reg data data where w = word flag Note “backwords” storage of data bytes

6 ASSEMBLING THE ”MOV" INSTRUCTION MOV destination, immediate value Consider: MOV AL,FF = B0 FF w reg data The 8-bit registers are designated: AL000AH100 CL001CH101 DL010DH110 BL011BH111

7 ASSEMBLING THE ”MOV" INSTRUCTION MOV destination, immediate value MOV AL,immed. B0h MOV CL,immed. B1h MOV DL,immed. B2h MOV BL,immed. B3h MOV AH,immed. B4h MOV CH,immed. B5h MOV DH,immed. B6h MOV BH,immed. B7h I R

8 ASSEMBLING THE ”MOV" INSTRUCTION MOV register, register d w mod reg r/m operation code EA byte w = word flag: w=0: byte; w=1: word d = direction flag: d=1: reg is destination d=0: r/m is destination mod = mode indicator: 4 possible values: 00, 01, 10, 11 reg = register r/m = register or memory indicator EA = effective address: “move what to where”

9 ASSEMBLING THE ”MOV" INSTRUCTION MOV register, register Examples: MOV BX,BP B DD d w mod reg = r/m = BX BP MOV BP,BX B EB d w mod reg = r/m = BP BX MOV BP,BX DD d w mod reg = r/m = BX BP

10 ASSEMBLING THE ”MOV" INSTRUCTION MOV register, register Consider 8-bit registers: MOV BL,CH A DD d w mod reg = r/m = BL CH

11 ASSEMBLING THE ”MOV" INSTRUCTION MOV register, memory or MOV memory, register d w mod reg r/m LSB of offset MSB of offset d w mod reg r/m LSB of offset MSB of offset MOV BX,[F000] = 8B 1E 00 F0 mod=00 and r/m=110 signify the bytes following the EA byte are an offset address Implied segment is DS: DS:[F000] Note “backwords” storage of F000.

12 ASSEMBLING THE ”MOV" INSTRUCTION MOV register, memory or MOV memory, register MOV [F000],BX Move the contents of register BX to location DS:F F F F F d w mod reg r/m LSB MSB ADD [F000],BX Add register BX to the contents of location DS:F000 CMP CX,[0080] Compare register CX with the byte at location DS:0800

13 ASSEMBLING THE ”MOV" INSTRUCTION MOV register, memory or MOV memory, register MOD=00 (and R/M isn't 110) In this case r/m specifies a register in which to find an address, as in: mod reg r/m MOV AX,[SI] d w AX -----SI---- "Move the contents of the address in SI to AX." The three registers that may be used in this way, along with their r/m values are: 100=SI, 101=DI, 111=BX.