SlideShare a Scribd company logo
1 of 30
Data Movement Instructions A Course in Microprocessor Electrical Engineering Department University of Indonesia
MOV Revisited ,[object Object],[object Object],[object Object]
MOV Revisited  (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object]
MOV Revisited  (cont’d) ,[object Object],[object Object],[object Object],[object Object]
MOV Revisited  (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MOV Revisited  (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object]
MOV Revisited  (cont’d) ,[object Object]
MOV Revisited  (cont’d) ,[object Object],[object Object],[object Object]
MOV Revisited  (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object]
PUSH/POP ,[object Object],[object Object],[object Object],[object Object],[object Object]
PUSH/POP  (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object]
PUSH/POP  (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object]
PUSH/POP  (cont’d) ,[object Object],[object Object],[object Object]
PUSH/POP  (cont’d) ,[object Object],[object Object],[object Object],[object Object]
(a) 16-bit instruction mode Opcode 1-2 bytes Immediate 0-1 bytes MOD-REG-R/M 0-1 bytes Displacement 0-1 bytes (b) 32-bit instruction mode (80386 through Pentium 4 only) Opcode 1-2 bytes Immediate 0-1 bytes MOD-REG-R/M 0-1 bytes Displacement 0-1 bytes Scaled-index 0-1 bytes Register size 0-1 bytes Address size 0-1 bytes Figure 4-1  The formats of the 8086-Pentium 4 instructors. (a) The 16-bit form and (b) the 32-bit form.
Figure 4-2  Byte 1 of many machine language instructions, showing the position of the D- and W-bits. Figure 4-3  Byte 2 of many machine language instructions, showing the position of the MOD, REG and R/M fields. W D Opcode MOD REG R/M
Opcode = MOV D = Transfer to register (REG) W = Word MOD = R/M is a register REG = BP R/M = SP FIGURE 4-4  The 8BEC instruction placed into bytes 1 and 2 formats from Figures 4-2 and 4-3. This instruction is a MOV BP,SP 0 0 1 1 0 1 1 1 1 1 0 1 0 0 0 1 R/M REG MOD W D Opcode Opcode = MOV D = Transfer to register (REG) W = Byte MOD = No displacement REG = DL R/M = DS:[DI] FIGURE 4-5  A MOV DL,[DI] instruction converted to its machine language form. 1 0 1 0 1 0 0 0 0 1 0 1 0 0 0 1 R/M REG MOD W D Opcode
 
 
 
 
 
 
 
 
R/M is a register 11 16-bit signed displacement 10 8-bit sign-extended displacement 01 No displacement 00 Function MOD TABLE 4-1 MOD field for the 16-bit instruction mode R/M is a register 11 32-bit signed displacement 10 8-bit sign-extended displacement 01 No displacement 00 Function MOD TABLE 4-2 MOD field for the 32-bit instruction mode (80386-Pentium 4 only)
EDI DI BH 111 ESI SI DH 110 EBP BP CH 101 ESP SP AH 100 EBX BX BL 011 EDX DX DL 010 EAX CX CL 001 EAX AX AL 000 W = 1 ( Doubleword) W = 1 (Word) W = 0 (Byte) Code TABLE 4-3  REG and R/M (when MOD = 11) assignments
 
 
 

More Related Content

What's hot

8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
Mir Majid
 
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxLecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
VikasMahor3
 
Project single cyclemips processor_verilog
Project single cyclemips processor_verilogProject single cyclemips processor_verilog
Project single cyclemips processor_verilog
Harsha Yelisala
 
Formulir SPT Masa PPh 21 Sejak Januari 2014 (PER_14_PJ_2013)
Formulir SPT Masa PPh 21 Sejak Januari 2014 (PER_14_PJ_2013)Formulir SPT Masa PPh 21 Sejak Januari 2014 (PER_14_PJ_2013)
Formulir SPT Masa PPh 21 Sejak Januari 2014 (PER_14_PJ_2013)
Kppkp Bangil
 

What's hot (20)

8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
Number system
Number system Number system
Number system
 
Phase shift keying(PSK)
Phase shift keying(PSK)Phase shift keying(PSK)
Phase shift keying(PSK)
 
Pulse modulation, Pulse Amplitude (PAM), Pulse Width (PWM/PLM/PDM), Pulse Pos...
Pulse modulation, Pulse Amplitude (PAM), Pulse Width (PWM/PLM/PDM), Pulse Pos...Pulse modulation, Pulse Amplitude (PAM), Pulse Width (PWM/PLM/PDM), Pulse Pos...
Pulse modulation, Pulse Amplitude (PAM), Pulse Width (PWM/PLM/PDM), Pulse Pos...
 
Pemeriksaan Pajak
Pemeriksaan PajakPemeriksaan Pajak
Pemeriksaan Pajak
 
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxLecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
 
Analog Transmission
Analog TransmissionAnalog Transmission
Analog Transmission
 
Laboratorio de Microcomputadoras - Práctica 05
 Laboratorio de Microcomputadoras - Práctica 05 Laboratorio de Microcomputadoras - Práctica 05
Laboratorio de Microcomputadoras - Práctica 05
 
8086 signals
8086 signals8086 signals
8086 signals
 
Java programming - solving problems with software
Java programming - solving problems with softwareJava programming - solving problems with software
Java programming - solving problems with software
 
8086 addressing modes
8086 addressing modes8086 addressing modes
8086 addressing modes
 
Project single cyclemips processor_verilog
Project single cyclemips processor_verilogProject single cyclemips processor_verilog
Project single cyclemips processor_verilog
 
Digital Communication 1
Digital Communication 1Digital Communication 1
Digital Communication 1
 
Stack
StackStack
Stack
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Rules of block diagram
Rules of block diagramRules of block diagram
Rules of block diagram
 
FM transmitter
FM transmitter FM transmitter
FM transmitter
 
Block diagram of msp430x5xx
Block diagram of msp430x5xxBlock diagram of msp430x5xx
Block diagram of msp430x5xx
 
Formulir SPT Masa PPh 21 Sejak Januari 2014 (PER_14_PJ_2013)
Formulir SPT Masa PPh 21 Sejak Januari 2014 (PER_14_PJ_2013)Formulir SPT Masa PPh 21 Sejak Januari 2014 (PER_14_PJ_2013)
Formulir SPT Masa PPh 21 Sejak Januari 2014 (PER_14_PJ_2013)
 
Analog signals
Analog signalsAnalog signals
Analog signals
 

Similar to Chapter4.1 2-mikroprocessor

Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary
janicetiong
 

Similar to Chapter4.1 2-mikroprocessor (20)

address5ng modes.pptx IS A GOOD MATERIAL
address5ng  modes.pptx IS A GOOD MATERIALaddress5ng  modes.pptx IS A GOOD MATERIAL
address5ng modes.pptx IS A GOOD MATERIAL
 
Chapter4.5 6-mikroprocessor
Chapter4.5 6-mikroprocessorChapter4.5 6-mikroprocessor
Chapter4.5 6-mikroprocessor
 
Notes 8086 instruction format
Notes 8086 instruction formatNotes 8086 instruction format
Notes 8086 instruction format
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 
advancsed microprocessor and interfacing
advancsed microprocessor and interfacingadvancsed microprocessor and interfacing
advancsed microprocessor and interfacing
 
system software 16 marks
system software 16 markssystem software 16 marks
system software 16 marks
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formats
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set
 
Chapter 3 programming concepts-ii
Chapter 3  programming concepts-iiChapter 3  programming concepts-ii
Chapter 3 programming concepts-ii
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
 
8086 Register organization and Architecture details
8086 Register organization and Architecture details8086 Register organization and Architecture details
8086 Register organization and Architecture details
 
Assembly code
Assembly codeAssembly code
Assembly code
 
intel 8086 introduction
intel 8086 introductionintel 8086 introduction
intel 8086 introduction
 
Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
 
Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary
 
Arm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.pptArm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.ppt
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Introduction of 8086 micro processor .
Introduction of 8086 micro processor .Introduction of 8086 micro processor .
Introduction of 8086 micro processor .
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 

More from teknik komputer ui (20)

Modul 1
Modul 1Modul 1
Modul 1
 
Modul 5
Modul 5Modul 5
Modul 5
 
Modul 4
Modul 4Modul 4
Modul 4
 
Modul 3
Modul 3Modul 3
Modul 3
 
Modul 1
Modul 1Modul 1
Modul 1
 
Modul 2
Modul 2Modul 2
Modul 2
 
The cisco networking academy net riders indonesia 2010 competition
The cisco networking academy net riders indonesia 2010 competitionThe cisco networking academy net riders indonesia 2010 competition
The cisco networking academy net riders indonesia 2010 competition
 
Rencana Proyek Divisi Komputer.doc
Rencana Proyek Divisi Komputer.docRencana Proyek Divisi Komputer.doc
Rencana Proyek Divisi Komputer.doc
 
Salinan Research Paper
Salinan Research PaperSalinan Research Paper
Salinan Research Paper
 
Chapter_1_Case_Study
Chapter_1_Case_StudyChapter_1_Case_Study
Chapter_1_Case_Study
 
Iins practice questions
Iins practice questionsIins practice questions
Iins practice questions
 
S1 intr ftui
S1 intr ftuiS1 intr ftui
S1 intr ftui
 
Exploration network chapter7
Exploration network chapter7Exploration network chapter7
Exploration network chapter7
 
Exploration network chapter6
Exploration network chapter6Exploration network chapter6
Exploration network chapter6
 
Exploration network chapter5
Exploration network chapter5Exploration network chapter5
Exploration network chapter5
 
Exploration network chapter4
Exploration network chapter4Exploration network chapter4
Exploration network chapter4
 
Exploration network chapter3
Exploration network chapter3Exploration network chapter3
Exploration network chapter3
 
Exploration network chapter2
Exploration network chapter2Exploration network chapter2
Exploration network chapter2
 
Exploration network chapter1
Exploration network chapter1Exploration network chapter1
Exploration network chapter1
 
Exploration network chapter11
Exploration network chapter11Exploration network chapter11
Exploration network chapter11
 

Chapter4.1 2-mikroprocessor

  • 1. Data Movement Instructions A Course in Microprocessor Electrical Engineering Department University of Indonesia
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. (a) 16-bit instruction mode Opcode 1-2 bytes Immediate 0-1 bytes MOD-REG-R/M 0-1 bytes Displacement 0-1 bytes (b) 32-bit instruction mode (80386 through Pentium 4 only) Opcode 1-2 bytes Immediate 0-1 bytes MOD-REG-R/M 0-1 bytes Displacement 0-1 bytes Scaled-index 0-1 bytes Register size 0-1 bytes Address size 0-1 bytes Figure 4-1 The formats of the 8086-Pentium 4 instructors. (a) The 16-bit form and (b) the 32-bit form.
  • 16. Figure 4-2 Byte 1 of many machine language instructions, showing the position of the D- and W-bits. Figure 4-3 Byte 2 of many machine language instructions, showing the position of the MOD, REG and R/M fields. W D Opcode MOD REG R/M
  • 17. Opcode = MOV D = Transfer to register (REG) W = Word MOD = R/M is a register REG = BP R/M = SP FIGURE 4-4 The 8BEC instruction placed into bytes 1 and 2 formats from Figures 4-2 and 4-3. This instruction is a MOV BP,SP 0 0 1 1 0 1 1 1 1 1 0 1 0 0 0 1 R/M REG MOD W D Opcode Opcode = MOV D = Transfer to register (REG) W = Byte MOD = No displacement REG = DL R/M = DS:[DI] FIGURE 4-5 A MOV DL,[DI] instruction converted to its machine language form. 1 0 1 0 1 0 0 0 0 1 0 1 0 0 0 1 R/M REG MOD W D Opcode
  • 18.  
  • 19.  
  • 20.  
  • 21.  
  • 22.  
  • 23.  
  • 24.  
  • 25.  
  • 26. R/M is a register 11 16-bit signed displacement 10 8-bit sign-extended displacement 01 No displacement 00 Function MOD TABLE 4-1 MOD field for the 16-bit instruction mode R/M is a register 11 32-bit signed displacement 10 8-bit sign-extended displacement 01 No displacement 00 Function MOD TABLE 4-2 MOD field for the 32-bit instruction mode (80386-Pentium 4 only)
  • 27. EDI DI BH 111 ESI SI DH 110 EBP BP CH 101 ESP SP AH 100 EBX BX BL 011 EDX DX DL 010 EAX CX CL 001 EAX AX AL 000 W = 1 ( Doubleword) W = 1 (Word) W = 0 (Byte) Code TABLE 4-3 REG and R/M (when MOD = 11) assignments
  • 28.  
  • 29.  
  • 30.