SlideShare ist ein Scribd-Unternehmen logo
1 von 12
MISCELLANEOUS DATA TRANSFER
INSTRUCTIONS
• Used in programs, data transfer instructions
detailed in this section are LAHF, SAHF, IN, OUT,
BSWAP, and CMOV.
LAHF and SAHF
• Seldom used bridge instructions.
• LAHF instruction transfers the rightmost 8 bits of
the flag register into the AH register.
• SAHF instruction transfers the AH register into the
rightmost 8 bits of the flag register.
• SAHF instruction may find some application with
the numeric coprocessor.
• As legacy instructions, they do not function in the
64-bit mode and are invalid instructions.
IN and OUT
• IN & OUT instructions perform I/O operations.
• Contents of AL, AX, or EAX are transferred only
between I/O device and microprocessor.
– an IN instruction transfers data from an external I/O
device into AL, AX, or EAX
– an OUT transfers data from AL, AX, or EAX to an
external I/O device
• Only the 80386 and above contain EAX
BSWAP
• Takes the contents of any 32-bit register and
swaps the first byte with the fourth, and the
second with the third.
– BSWAP (byte swap) is available only in 80486–Pentium
4 microprocessors
• This instruction is used to convert data between
the big and little endian forms.
• In 64-bit operation for the Pentium 4, all 8 bytes in
the selected operand are swapped.
CMOV
• Many variations of the CMOV instruction.
– these move the data only if the condition is true
• CMOVZ instruction moves data only if the result
from some prior instruction was a zero.
– destination is limited to only a 16- or 32-bit register,
but the source can be a 16- or 32-bit register or
memory location
• Because this is a new instruction, you cannot use it
with the assembler unless the .686 switch is added
to the program
Directives
• Indicate how an operand or section of a program
is to be processed by the assembler.
– some generate and store information in the memory;
others do not
• The DB (define byte) directive stores bytes of data
in the memory.
• BYTE PTR indicates the size of the data referenced
by a pointer or index register.
• Complex sections of assembly code are still
written using MASM.
Storing Data in a Memory Segment
• DB (define byte), DW (define word), and DD
(define doubleword) are most often used with
MASM to define and store memory data.
• If a numeric coprocessor executes software in the
system, the DQ (define quadword) and DT (define
ten bytes) directives are also common.
• These directives label a memory location with a
symbolic name and indicate its size.
• Memory is reserved for use in the future by using
a question mark (?) as an operand for a DB, DW,
or DD directive.
– when ? is used in place of a numeric or ASCII value,
the assembler sets aside a location and does not
initialize it to any specific value
• It is important that word-sized data are placed at
word boundaries and doubleword-sized data are
placed at doubleword boundaries.
– if not, the microprocessor spends additional
time accessing these data types
ASSUME, EQU, and ORG
• Equate directive (EQU) equates a numeric, ASCII,
or label to another label.
– equates make a program clearer and simplify
debugging
• The THIS directive always appears as THIS BYTE,
THIS WORD, THIS DWORD, or THIS QWORD.
• The assembler can only assign either a byte, word,
or doubleword address to a label.
• The ORG (origin) statement changes the starting
offset address of the data in the data segment to
location 300H.
• At times, the origin of data or the code must be
assigned to an absolute offset address with the
ORG statement.
• ASSUME tells the assembler what names have
been chosen for the code, data, extra, and stack
segments.
PROC and ENDP
• Indicate start and end of a procedure (subroutine).
– they force structure because the procedure is clearly
defined
• If structure is to be violated for whatever reason,
use the CALLF, CALLN, RETF, and RETN
instructions.
• Both the PROC and ENDP directives require a label
to indicate the name of the procedure.
• The PROC directive, which indicates the start of a
procedure, must also be followed with a NEAR or
FAR.
– A NEAR procedure is one that resides in the same code
segment as the program, often considered to be local
– A FAR procedure may reside at any location in the
memory system, considered global
• The term global denotes a procedure that can be
used by any program.
• Local defines a procedure that is only used by the
current program.

Weitere ähnliche Inhalte

Was ist angesagt?

SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERSkumari36
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorpal bhumit
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
Minimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorMinimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorNikhil Kumar
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly languageMir Majid
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Shehrevar Davierwala
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386KanchanPatil34
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA ControllerShivamSood22
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086saurav kumar
 
Operation of 8255A
Operation of 8255AOperation of 8255A
Operation of 8255AAnuj Yadav
 
Subroutine & string in 8086 Microprocessor
Subroutine & string in 8086 MicroprocessorSubroutine & string in 8086 Microprocessor
Subroutine & string in 8086 MicroprocessorMustafa AL-Timemmie
 
Pin digram of 8086
Pin digram of 8086Pin digram of 8086
Pin digram of 8086RJ
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORSagar Kuntumal
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386PDFSHARE
 
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086COMSATS Abbottabad
 
advancsed microprocessor and interfacing
advancsed microprocessor and interfacingadvancsed microprocessor and interfacing
advancsed microprocessor and interfacing@zenafaris91
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086Akhila Rahul
 

Was ist angesagt? (20)

SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERS
 
Processoer 80486
Processoer 80486Processoer 80486
Processoer 80486
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessor
 
Stack
StackStack
Stack
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
Minimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorMinimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 Microprocessor
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Registers siso, sipo
Registers siso, sipoRegisters siso, sipo
Registers siso, sipo
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Operation of 8255A
Operation of 8255AOperation of 8255A
Operation of 8255A
 
Subroutine & string in 8086 Microprocessor
Subroutine & string in 8086 MicroprocessorSubroutine & string in 8086 Microprocessor
Subroutine & string in 8086 Microprocessor
 
Pin digram of 8086
Pin digram of 8086Pin digram of 8086
Pin digram of 8086
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSOR
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386
 
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
 
advancsed microprocessor and interfacing
advancsed microprocessor and interfacingadvancsed microprocessor and interfacing
advancsed microprocessor and interfacing
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 

Andere mochten auch

10 8086 instruction set
10 8086 instruction set10 8086 instruction set
10 8086 instruction setShivam Singhal
 
5. bahan tayang penerapan pendekatan scientific pada pemb tematik
5. bahan tayang penerapan pendekatan scientific pada pemb tematik5. bahan tayang penerapan pendekatan scientific pada pemb tematik
5. bahan tayang penerapan pendekatan scientific pada pemb tematikIda Fitroh Scooter
 
Gestion de proyectos fvera
Gestion de proyectos fveraGestion de proyectos fvera
Gestion de proyectos fveraFlorencia Perugi
 
Blood glucose prediction
Blood glucose predictionBlood glucose prediction
Blood glucose predictionRAVI KANT
 
Manjakani Kanza - Jual Obat Manjakani Kanza Aceh Original
Manjakani Kanza - Jual Obat Manjakani Kanza Aceh OriginalManjakani Kanza - Jual Obat Manjakani Kanza Aceh Original
Manjakani Kanza - Jual Obat Manjakani Kanza Aceh OriginalManjakani Kanza
 
ANDI AZIZ (Kasus yang dilupakan)
ANDI AZIZ (Kasus yang dilupakan)ANDI AZIZ (Kasus yang dilupakan)
ANDI AZIZ (Kasus yang dilupakan)wisnuajin
 
КВН "Алгоритмы вокруг нас"
КВН "Алгоритмы вокруг нас"КВН "Алгоритмы вокруг нас"
КВН "Алгоритмы вокруг нас"svetlanamur
 
Heartfulness Magazine Issue 13
Heartfulness Magazine Issue 13Heartfulness Magazine Issue 13
Heartfulness Magazine Issue 13heartfulness
 
En the beautiful names of allah
En the beautiful names of allahEn the beautiful names of allah
En the beautiful names of allahAbu Qasim
 
Heartfulness Magazine Issue 8
Heartfulness Magazine Issue 8Heartfulness Magazine Issue 8
Heartfulness Magazine Issue 8heartfulness
 
Heartfulness Magazine Issue 4
Heartfulness Magazine Issue 4Heartfulness Magazine Issue 4
Heartfulness Magazine Issue 4heartfulness
 
Heartfulness Magazine - Volume 2_issue1_Jan 2017
Heartfulness Magazine - Volume 2_issue1_Jan 2017Heartfulness Magazine - Volume 2_issue1_Jan 2017
Heartfulness Magazine - Volume 2_issue1_Jan 2017heartfulness
 
imc campaign Le panga (pro kabbadi)
imc campaign Le panga  (pro kabbadi)imc campaign Le panga  (pro kabbadi)
imc campaign Le panga (pro kabbadi)deepshikha gupta
 

Andere mochten auch (20)

10 8086 instruction set
10 8086 instruction set10 8086 instruction set
10 8086 instruction set
 
5. bahan tayang penerapan pendekatan scientific pada pemb tematik
5. bahan tayang penerapan pendekatan scientific pada pemb tematik5. bahan tayang penerapan pendekatan scientific pada pemb tematik
5. bahan tayang penerapan pendekatan scientific pada pemb tematik
 
Gestion de proyectos fvera
Gestion de proyectos fveraGestion de proyectos fvera
Gestion de proyectos fvera
 
Rey tut
Rey tutRey tut
Rey tut
 
Blood glucose prediction
Blood glucose predictionBlood glucose prediction
Blood glucose prediction
 
Manjakani Kanza - Jual Obat Manjakani Kanza Aceh Original
Manjakani Kanza - Jual Obat Manjakani Kanza Aceh OriginalManjakani Kanza - Jual Obat Manjakani Kanza Aceh Original
Manjakani Kanza - Jual Obat Manjakani Kanza Aceh Original
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
ANDI AZIZ (Kasus yang dilupakan)
ANDI AZIZ (Kasus yang dilupakan)ANDI AZIZ (Kasus yang dilupakan)
ANDI AZIZ (Kasus yang dilupakan)
 
КВН "Алгоритмы вокруг нас"
КВН "Алгоритмы вокруг нас"КВН "Алгоритмы вокруг нас"
КВН "Алгоритмы вокруг нас"
 
Heartfulness Magazine Issue 13
Heartfulness Magazine Issue 13Heartfulness Magazine Issue 13
Heartfulness Magazine Issue 13
 
Algorithm1
Algorithm1Algorithm1
Algorithm1
 
En the beautiful names of allah
En the beautiful names of allahEn the beautiful names of allah
En the beautiful names of allah
 
Resume
ResumeResume
Resume
 
Discapac. visual ute e10
Discapac. visual ute e10Discapac. visual ute e10
Discapac. visual ute e10
 
Heartfulness Magazine Issue 8
Heartfulness Magazine Issue 8Heartfulness Magazine Issue 8
Heartfulness Magazine Issue 8
 
Heartfulness Magazine Issue 4
Heartfulness Magazine Issue 4Heartfulness Magazine Issue 4
Heartfulness Magazine Issue 4
 
Heartfulness Magazine - Volume 2_issue1_Jan 2017
Heartfulness Magazine - Volume 2_issue1_Jan 2017Heartfulness Magazine - Volume 2_issue1_Jan 2017
Heartfulness Magazine - Volume 2_issue1_Jan 2017
 
imc campaign Le panga (pro kabbadi)
imc campaign Le panga  (pro kabbadi)imc campaign Le panga  (pro kabbadi)
imc campaign Le panga (pro kabbadi)
 
Resume Chinmay
Resume ChinmayResume Chinmay
Resume Chinmay
 
2016 Client Survey Results
2016 Client Survey Results2016 Client Survey Results
2016 Client Survey Results
 

Ähnlich wie Microprocessor Miscellaneous datatrans+directives

8085 instructions and addressing modes
8085 instructions and addressing modes8085 instructions and addressing modes
8085 instructions and addressing modesSuchismita Paul
 
micro chapter 3jjgffffyeyhhuyerfftfgggffgjj
micro chapter 3jjgffffyeyhhuyerfftfgggffgjjmicro chapter 3jjgffffyeyhhuyerfftfgggffgjj
micro chapter 3jjgffffyeyhhuyerfftfgggffgjjTadeseBeyene
 
Hafwgwhwhwhwhwwywwuwyeeeueue3UNIT 2 MP.ppt
Hafwgwhwhwhwhwwywwuwyeeeueue3UNIT 2 MP.pptHafwgwhwhwhwhwwywwuwyeeeueue3UNIT 2 MP.ppt
Hafwgwhwhwhwhwwywwuwyeeeueue3UNIT 2 MP.pptAshutoshPawar32
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015vtunotesbysree
 
Introduction to 80386 microprocessor
Introduction to 80386 microprocessorIntroduction to 80386 microprocessor
Introduction to 80386 microprocessorShehrevar Davierwala
 
80386_ Bus Cycles & System Architecture.pdf
80386_ Bus Cycles & System Architecture.pdf80386_ Bus Cycles & System Architecture.pdf
80386_ Bus Cycles & System Architecture.pdfrupalidalvi10
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data typesRowena Cornejo
 
Intel8086_Flags_Addr_Modes_sample_pgms.pdf
Intel8086_Flags_Addr_Modes_sample_pgms.pdfIntel8086_Flags_Addr_Modes_sample_pgms.pdf
Intel8086_Flags_Addr_Modes_sample_pgms.pdfAnonymous611358
 
Microprocessor and Microcontroller.pptx
Microprocessor and Microcontroller.pptxMicroprocessor and Microcontroller.pptx
Microprocessor and Microcontroller.pptxpvg123456
 

Ähnlich wie Microprocessor Miscellaneous datatrans+directives (20)

8085 instructions and addressing modes
8085 instructions and addressing modes8085 instructions and addressing modes
8085 instructions and addressing modes
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
micro chapter 3jjgffffyeyhhuyerfftfgggffgjj
micro chapter 3jjgffffyeyhhuyerfftfgggffgjjmicro chapter 3jjgffffyeyhhuyerfftfgggffgjj
micro chapter 3jjgffffyeyhhuyerfftfgggffgjj
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Hafwgwhwhwhwhwwywwuwyeeeueue3UNIT 2 MP.ppt
Hafwgwhwhwhwhwwywwuwyeeeueue3UNIT 2 MP.pptHafwgwhwhwhwhwwywwuwyeeeueue3UNIT 2 MP.ppt
Hafwgwhwhwhwhwwywwuwyeeeueue3UNIT 2 MP.ppt
 
report-MICRO-P (2).pptx
report-MICRO-P (2).pptxreport-MICRO-P (2).pptx
report-MICRO-P (2).pptx
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
 
Introduction to 80386 microprocessor
Introduction to 80386 microprocessorIntroduction to 80386 microprocessor
Introduction to 80386 microprocessor
 
8051d
8051d8051d
8051d
 
80386_ Bus Cycles & System Architecture.pdf
80386_ Bus Cycles & System Architecture.pdf80386_ Bus Cycles & System Architecture.pdf
80386_ Bus Cycles & System Architecture.pdf
 
Pentium processor
Pentium processorPentium processor
Pentium processor
 
unit-2.pptx
unit-2.pptxunit-2.pptx
unit-2.pptx
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data types
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
microprocessor
 microprocessor microprocessor
microprocessor
 
Intel8086_Flags_Addr_Modes_sample_pgms.pdf
Intel8086_Flags_Addr_Modes_sample_pgms.pdfIntel8086_Flags_Addr_Modes_sample_pgms.pdf
Intel8086_Flags_Addr_Modes_sample_pgms.pdf
 
Introduction to 80386
Introduction to 80386Introduction to 80386
Introduction to 80386
 
Microprocessor and Microcontroller.pptx
Microprocessor and Microcontroller.pptxMicroprocessor and Microcontroller.pptx
Microprocessor and Microcontroller.pptx
 
Intel IA 64
Intel IA 64Intel IA 64
Intel IA 64
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 

Kürzlich hochgeladen

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 

Kürzlich hochgeladen (20)

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Microprocessor Miscellaneous datatrans+directives

  • 1. MISCELLANEOUS DATA TRANSFER INSTRUCTIONS • Used in programs, data transfer instructions detailed in this section are LAHF, SAHF, IN, OUT, BSWAP, and CMOV.
  • 2. LAHF and SAHF • Seldom used bridge instructions. • LAHF instruction transfers the rightmost 8 bits of the flag register into the AH register. • SAHF instruction transfers the AH register into the rightmost 8 bits of the flag register. • SAHF instruction may find some application with the numeric coprocessor. • As legacy instructions, they do not function in the 64-bit mode and are invalid instructions.
  • 3. IN and OUT • IN & OUT instructions perform I/O operations. • Contents of AL, AX, or EAX are transferred only between I/O device and microprocessor. – an IN instruction transfers data from an external I/O device into AL, AX, or EAX – an OUT transfers data from AL, AX, or EAX to an external I/O device • Only the 80386 and above contain EAX
  • 4. BSWAP • Takes the contents of any 32-bit register and swaps the first byte with the fourth, and the second with the third. – BSWAP (byte swap) is available only in 80486–Pentium 4 microprocessors • This instruction is used to convert data between the big and little endian forms. • In 64-bit operation for the Pentium 4, all 8 bytes in the selected operand are swapped.
  • 5. CMOV • Many variations of the CMOV instruction. – these move the data only if the condition is true • CMOVZ instruction moves data only if the result from some prior instruction was a zero. – destination is limited to only a 16- or 32-bit register, but the source can be a 16- or 32-bit register or memory location • Because this is a new instruction, you cannot use it with the assembler unless the .686 switch is added to the program
  • 6. Directives • Indicate how an operand or section of a program is to be processed by the assembler. – some generate and store information in the memory; others do not • The DB (define byte) directive stores bytes of data in the memory. • BYTE PTR indicates the size of the data referenced by a pointer or index register. • Complex sections of assembly code are still written using MASM.
  • 7. Storing Data in a Memory Segment • DB (define byte), DW (define word), and DD (define doubleword) are most often used with MASM to define and store memory data. • If a numeric coprocessor executes software in the system, the DQ (define quadword) and DT (define ten bytes) directives are also common. • These directives label a memory location with a symbolic name and indicate its size.
  • 8. • Memory is reserved for use in the future by using a question mark (?) as an operand for a DB, DW, or DD directive. – when ? is used in place of a numeric or ASCII value, the assembler sets aside a location and does not initialize it to any specific value • It is important that word-sized data are placed at word boundaries and doubleword-sized data are placed at doubleword boundaries. – if not, the microprocessor spends additional time accessing these data types
  • 9. ASSUME, EQU, and ORG • Equate directive (EQU) equates a numeric, ASCII, or label to another label. – equates make a program clearer and simplify debugging • The THIS directive always appears as THIS BYTE, THIS WORD, THIS DWORD, or THIS QWORD. • The assembler can only assign either a byte, word, or doubleword address to a label.
  • 10. • The ORG (origin) statement changes the starting offset address of the data in the data segment to location 300H. • At times, the origin of data or the code must be assigned to an absolute offset address with the ORG statement. • ASSUME tells the assembler what names have been chosen for the code, data, extra, and stack segments.
  • 11. PROC and ENDP • Indicate start and end of a procedure (subroutine). – they force structure because the procedure is clearly defined • If structure is to be violated for whatever reason, use the CALLF, CALLN, RETF, and RETN instructions. • Both the PROC and ENDP directives require a label to indicate the name of the procedure.
  • 12. • The PROC directive, which indicates the start of a procedure, must also be followed with a NEAR or FAR. – A NEAR procedure is one that resides in the same code segment as the program, often considered to be local – A FAR procedure may reside at any location in the memory system, considered global • The term global denotes a procedure that can be used by any program. • Local defines a procedure that is only used by the current program.