SlideShare una empresa de Scribd logo
1 de 24
Microprocessor System
SESSION OF MOTOROLA 6800

By
Engr.Shafiullah Soomro
safiullah123@gmail.com
History of Motorola 6800
►

The 6800 ("sixty-eight-hundred") was an 8-bit 
microprocessor designed and first manufactured by 
Motorola in 1974.

►

The 6800 has a 16-bit address bus that could directly
access 64 KB of memory and an 8-bit bi-directional data
bus.

►

It has 72 instructions with seven addressing modes for a
total of 197opcodes. The original MC6800 could have a
clock frequency of up to 1 MHz. Later versions had a
maximum clock frequency of 2 MHz.
Other Motorola microprocessors
Short Description of Pin Diagram
Pin description
6800 Architecture
Register Set and Programmers Model
► The

6800 has six internally accessible registers.
These are two 8-bit accumulators or general
purpose register (A and B),
► three 16-bit registers PC, SP, and
► Index register - X)
► and an 8-bit condition code or status register
which has 6 flags in total.
A

8 bit accumulators,
general purpose
registers

B
Program Counter - PC
Stack Pointer - SP

16 bit registers

Index Register - X
H

I

N

Z

V

C

8 bit status register
►
►
►
►
►
►
►
►

The Accumulators A and B :
Each stores and manipulates one 8-bit word under program control.
 
The Index register - X
Is a 2-byte register. It holds memory addresses when using indexedaddressing mode instructions.
 
The Program Counter - PC
Is a 2-byte register which contains the address of the next byte of the
instruction to be fetched from memory (instructions can be from one to
3 bytes in length). When the current value of the program counter is
placed on the address bus, the PC is updated to the value of the next
instruction for execution.
►
►

►
►

Stack pointer - SP
A 2-byte register which holds the starting address of
sequential memory locations in RAM where the contents of
the CPU registers may be stored and retrieved. The 6800
uses RAM for its stack.
Status Register or Condition Codes Register
This final register contains six flags which are set or
cleared in response to how the program executes. These
flags are:
►
►
►
►
►
►
►
►
►
►

Condition Code Register: It shows the conditions
occurs as a result of an Arithmetic Logic Unit
Bit 0: carry from bit 7 of an arithmetic operation (C)
Bit 1: Overflow flag (V)
Bit 2: Zero flag (Z)
Bit 3: Negative flag (N)
Bit 4: Interrupt Mask (I)
Bit 5: Half carry from bit 3 of an arithmetic operation (H)
Bit 6: Unused
Bit 7: Unused
These bits of the Condition Code Register are used as
testable conditions for the conditional branch instructions.
Bit 4 of the CCR is the interrupt mask bit (I). The unused
bits of the Condition Code Register (bit 6 and bit 7) are 1.
ADDRESSING MODES
►

►
►
►
►

The 6800 uses a 16-bit address bus allowing access to
65,536 8-bit words within memory. The 16-bit address can
be split into a most significant (MS) byte, the first 8-bits of
the address and the Least Significant (LS) byte the second
8-bits. For Input Output I/O a portion of memory space is
used to access I/O ports.
 There are seven addressing modes available to a 6800
programmer.
Accumulator Addressing
In accumulator addressing, either accumulator A or
accumulator B is specified. These are 1-byte instructions.
Ex: ABA adds the contents of accumulators and stores
the result in accumulator A
►
►

►

►
►

►

Immediate Addressing
In immediate addressing, operand is located immediately after the
opcode in the second byte of the instruction in program memory
(except LDS and LDX where the operand is in the second and third
bytes of the instruction). These are 2-byte or 3-byte instructions.
Ex: LDAA #25H loads the number (25)H into accumulator A

Direct Addressing
In direct addressing, the address of the operand is contained in the
second byte of the instruction. Direct addressing allows the user to
directly address the lowest 256 bytes of the memory, i.e, locations 0
through 255. Enhanced execution times are achieved by storing data
in these locations. These are 2-byte instructions.
Ex: LDAA 25H loads the contents of the memory address (25)H into
accumulator A
►
►

►

Extended Addressing
In extended addressing, the address contained in the
second byte of the instruction is used as the higher eight
bits of the address of the operand. The third byte of the
instruction is used as the lower eight bits of the address for
the operand. This is an absolute address in the memory.
These are 3-byte instructions.
Ex: LDAA 1000H loads the contents of the memory
address (1000)H into accumulator A
►
►

►

►
►
►

Indexed Addressing
In indexed addressing, the address contained in the second
byte of the instruction is added to the index register’s lowest
eight bits.
The carry is then added to the higher order eight bits of the
index register. This result is then used to address memory.
The modified address is held in a temporary address
register so there is no change to the index register. These
are 2-byte instructions.
Ex: LDX #1000H
LDAA 10H,X
Initially, LDX #1000H instruction loads 1000H to the index
register (X) using immediate addressing. Then LDAA 10H,X
instruction, using indexed addressing, loads the contents of
memory address (10)H + X=1010H into accumulator A.
►
►

►

►
►

Implied (Inherent) Addressing
In the implied addressing mode, the instruction gives the
address inherently (i.e, stack pointer, index register, etc.).
Inherent instructions are used when no operands need to
be fetched. These are 1- byte instructions.
Ex: INX increases the contents of the Index register by
one. The address information is "inherent" in the instruction
itself.
INCA increases the contents of the accumulator A by one.
DECB decreases the contents of the accumulator B by
one.
►

Relative Addressing
The relative addressing mode is used with most of the branching
instructions on the 6802 microprocessor. The first byte of the
instruction is the opcode. The second byte of the instruction is
called the offset . The offset is interpreted as a signed 7-bit
number .
If the MSB (most significant bit) of the offset is 0, the number is
positive, which indicates a forward branch. If the MSB of the offset
is 1, the number is negative, which indicates a backward branch.
This allows the user to address data in a range of -126 to +129
bytes of the present instruction. These are 2-byte instructions.
Ex: PC Hex Label Instruction

►

0009 2004 BRA 0FH

►
►

►
Flags

Más contenido relacionado

La actualidad más candente

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
Nikhil Kumar
 
Intel 8257 programmable dma controller
Intel 8257 programmable dma controllerIntel 8257 programmable dma controller
Intel 8257 programmable dma controller
abdulugc
 
02 addressing modes 6800
02 addressing modes 680002 addressing modes 6800
02 addressing modes 6800
kashambabu
 
Microprocessor vs. microcontroller
Microprocessor vs. microcontrollerMicroprocessor vs. microcontroller
Microprocessor vs. microcontroller
aviban
 

La actualidad más candente (20)

Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
 
8051 i/o port circuit
8051 i/o port circuit8051 i/o port circuit
8051 i/o port circuit
 
The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systems
 
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
 
The 80386 80486
The 80386 80486The 80386 80486
The 80386 80486
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
Intel 8257 programmable dma controller
Intel 8257 programmable dma controllerIntel 8257 programmable dma controller
Intel 8257 programmable dma controller
 
8051 memory
8051 memory8051 memory
8051 memory
 
microprocessor 8085
microprocessor 8085microprocessor 8085
microprocessor 8085
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
8051 programming in c
8051 programming in c8051 programming in c
8051 programming in c
 
INTEL 80386 MICROPROCESSOR
INTEL  80386  MICROPROCESSORINTEL  80386  MICROPROCESSOR
INTEL 80386 MICROPROCESSOR
 
Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
 
02 addressing modes 6800
02 addressing modes 680002 addressing modes 6800
02 addressing modes 6800
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 Microcontroller
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
 
Microprocessor vs. microcontroller
Microprocessor vs. microcontrollerMicroprocessor vs. microcontroller
Microprocessor vs. microcontroller
 

Destacado (6)

Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Microprocessor systems (4)
Microprocessor systems (4)Microprocessor systems (4)
Microprocessor systems (4)
 
32 bit and 64 bit Register manipulation
32 bit and 64 bit Register manipulation32 bit and 64 bit Register manipulation
32 bit and 64 bit Register manipulation
 
Microprocessor Systems
Microprocessor Systems Microprocessor Systems
Microprocessor Systems
 
Microprocessor systems 8085(2)
Microprocessor systems 8085(2)Microprocessor systems 8085(2)
Microprocessor systems 8085(2)
 

Similar a M6800

Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
gomathy S
 
3 organization of intel 8086
3 organization of intel 80863 organization of intel 8086
3 organization of intel 8086
ELIMENG
 

Similar a M6800 (20)

15CS44 MP & MC Module 1
15CS44 MP & MC Module 115CS44 MP & MC Module 1
15CS44 MP & MC Module 1
 
Blackfin Processor Core Architecture Part 2
Blackfin Processor Core Architecture Part 2Blackfin Processor Core Architecture Part 2
Blackfin Processor Core Architecture Part 2
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
Pdemodule 4
Pdemodule 4Pdemodule 4
Pdemodule 4
 
Z 80 processors (History-Products)
Z 80 processors (History-Products)Z 80 processors (History-Products)
Z 80 processors (History-Products)
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
 
Lecture9
Lecture9Lecture9
Lecture9
 
Microprocessor 8085 architecture ppt. april 2013
Microprocessor 8085 architecture ppt. april 2013Microprocessor 8085 architecture ppt. april 2013
Microprocessor 8085 architecture ppt. april 2013
 
assignment 1-MC.pdf
assignment 1-MC.pdfassignment 1-MC.pdf
assignment 1-MC.pdf
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Bt0068
Bt0068Bt0068
Bt0068
 
Architecture OF 8085
Architecture OF 8085Architecture OF 8085
Architecture OF 8085
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
8085
80858085
8085
 
8085
80858085
8085
 
Bt0068 computer organization and architecture
Bt0068 computer organization and architecture Bt0068 computer organization and architecture
Bt0068 computer organization and architecture
 
UNIT 1 Microprocessors.pptx
UNIT 1 Microprocessors.pptxUNIT 1 Microprocessors.pptx
UNIT 1 Microprocessors.pptx
 
3 organization of intel 8086
3 organization of intel 80863 organization of intel 8086
3 organization of intel 8086
 

Más de Quaid-e-Awam University of Engineering Science and Technology Nawabshah Sindh Pakistan

Más de Quaid-e-Awam University of Engineering Science and Technology Nawabshah Sindh Pakistan (20)

Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lecture 0 for Civil Engineering
Lecture 0 for Civil EngineeringLecture 0 for Civil Engineering
Lecture 0 for Civil Engineering
 
Intro ch 09_a
Intro ch 09_aIntro ch 09_a
Intro ch 09_a
 
Intro ch 07_a
Intro ch 07_aIntro ch 07_a
Intro ch 07_a
 
Intro ch 06_b
Intro ch 06_bIntro ch 06_b
Intro ch 06_b
 
Intro ch 05_b
Intro ch 05_bIntro ch 05_b
Intro ch 05_b
 
Intro ch 05_a
Intro ch 05_aIntro ch 05_a
Intro ch 05_a
 
Intro ch 04_b
Intro ch 04_bIntro ch 04_b
Intro ch 04_b
 
Intro ch 04_a
Intro ch 04_aIntro ch 04_a
Intro ch 04_a
 
Intro ch 04_b
Intro ch 04_bIntro ch 04_b
Intro ch 04_b
 
Intro ch 03_a
Intro ch 03_aIntro ch 03_a
Intro ch 03_a
 
Intro ch 03_b
Intro ch 03_bIntro ch 03_b
Intro ch 03_b
 
Lecture 2 generations
Lecture 2  generationsLecture 2  generations
Lecture 2 generations
 
Intro ch 01_a
Intro ch 01_aIntro ch 01_a
Intro ch 01_a
 
Microprocessor systems 8085
Microprocessor systems 8085Microprocessor systems 8085
Microprocessor systems 8085
 
Microprocessor 11el01
Microprocessor 11el01Microprocessor 11el01
Microprocessor 11el01
 

Último

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
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
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
heathfieldcps1
 

Último (20)

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...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.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
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
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
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 

M6800

  • 1. Microprocessor System SESSION OF MOTOROLA 6800 By Engr.Shafiullah Soomro safiullah123@gmail.com
  • 3. ► The 6800 ("sixty-eight-hundred") was an 8-bit  microprocessor designed and first manufactured by  Motorola in 1974. ► The 6800 has a 16-bit address bus that could directly access 64 KB of memory and an 8-bit bi-directional data bus. ► It has 72 instructions with seven addressing modes for a total of 197opcodes. The original MC6800 could have a clock frequency of up to 1 MHz. Later versions had a maximum clock frequency of 2 MHz.
  • 5. Short Description of Pin Diagram
  • 6.
  • 9. Register Set and Programmers Model ► The 6800 has six internally accessible registers. These are two 8-bit accumulators or general purpose register (A and B), ► three 16-bit registers PC, SP, and ► Index register - X) ► and an 8-bit condition code or status register which has 6 flags in total.
  • 10. A 8 bit accumulators, general purpose registers B Program Counter - PC Stack Pointer - SP 16 bit registers Index Register - X H I N Z V C 8 bit status register
  • 11. ► ► ► ► ► ► ► ► The Accumulators A and B : Each stores and manipulates one 8-bit word under program control.   The Index register - X Is a 2-byte register. It holds memory addresses when using indexedaddressing mode instructions.   The Program Counter - PC Is a 2-byte register which contains the address of the next byte of the instruction to be fetched from memory (instructions can be from one to 3 bytes in length). When the current value of the program counter is placed on the address bus, the PC is updated to the value of the next instruction for execution.
  • 12. ► ► ► ► Stack pointer - SP A 2-byte register which holds the starting address of sequential memory locations in RAM where the contents of the CPU registers may be stored and retrieved. The 6800 uses RAM for its stack. Status Register or Condition Codes Register This final register contains six flags which are set or cleared in response to how the program executes. These flags are:
  • 13. ► ► ► ► ► ► ► ► ► ► Condition Code Register: It shows the conditions occurs as a result of an Arithmetic Logic Unit Bit 0: carry from bit 7 of an arithmetic operation (C) Bit 1: Overflow flag (V) Bit 2: Zero flag (Z) Bit 3: Negative flag (N) Bit 4: Interrupt Mask (I) Bit 5: Half carry from bit 3 of an arithmetic operation (H) Bit 6: Unused Bit 7: Unused These bits of the Condition Code Register are used as testable conditions for the conditional branch instructions. Bit 4 of the CCR is the interrupt mask bit (I). The unused bits of the Condition Code Register (bit 6 and bit 7) are 1.
  • 14.
  • 15. ADDRESSING MODES ► ► ► ► ► The 6800 uses a 16-bit address bus allowing access to 65,536 8-bit words within memory. The 16-bit address can be split into a most significant (MS) byte, the first 8-bits of the address and the Least Significant (LS) byte the second 8-bits. For Input Output I/O a portion of memory space is used to access I/O ports.  There are seven addressing modes available to a 6800 programmer. Accumulator Addressing In accumulator addressing, either accumulator A or accumulator B is specified. These are 1-byte instructions. Ex: ABA adds the contents of accumulators and stores the result in accumulator A
  • 16. ► ► ► ► ► ► Immediate Addressing In immediate addressing, operand is located immediately after the opcode in the second byte of the instruction in program memory (except LDS and LDX where the operand is in the second and third bytes of the instruction). These are 2-byte or 3-byte instructions. Ex: LDAA #25H loads the number (25)H into accumulator A Direct Addressing In direct addressing, the address of the operand is contained in the second byte of the instruction. Direct addressing allows the user to directly address the lowest 256 bytes of the memory, i.e, locations 0 through 255. Enhanced execution times are achieved by storing data in these locations. These are 2-byte instructions. Ex: LDAA 25H loads the contents of the memory address (25)H into accumulator A
  • 17.
  • 18. ► ► ► Extended Addressing In extended addressing, the address contained in the second byte of the instruction is used as the higher eight bits of the address of the operand. The third byte of the instruction is used as the lower eight bits of the address for the operand. This is an absolute address in the memory. These are 3-byte instructions. Ex: LDAA 1000H loads the contents of the memory address (1000)H into accumulator A
  • 19. ► ► ► ► ► ► Indexed Addressing In indexed addressing, the address contained in the second byte of the instruction is added to the index register’s lowest eight bits. The carry is then added to the higher order eight bits of the index register. This result is then used to address memory. The modified address is held in a temporary address register so there is no change to the index register. These are 2-byte instructions. Ex: LDX #1000H LDAA 10H,X Initially, LDX #1000H instruction loads 1000H to the index register (X) using immediate addressing. Then LDAA 10H,X instruction, using indexed addressing, loads the contents of memory address (10)H + X=1010H into accumulator A.
  • 20.
  • 21. ► ► ► ► ► Implied (Inherent) Addressing In the implied addressing mode, the instruction gives the address inherently (i.e, stack pointer, index register, etc.). Inherent instructions are used when no operands need to be fetched. These are 1- byte instructions. Ex: INX increases the contents of the Index register by one. The address information is "inherent" in the instruction itself. INCA increases the contents of the accumulator A by one. DECB decreases the contents of the accumulator B by one.
  • 22. ► Relative Addressing The relative addressing mode is used with most of the branching instructions on the 6802 microprocessor. The first byte of the instruction is the opcode. The second byte of the instruction is called the offset . The offset is interpreted as a signed 7-bit number . If the MSB (most significant bit) of the offset is 0, the number is positive, which indicates a forward branch. If the MSB of the offset is 1, the number is negative, which indicates a backward branch. This allows the user to address data in a range of -126 to +129 bytes of the present instruction. These are 2-byte instructions. Ex: PC Hex Label Instruction ► 0009 2004 BRA 0FH ► ► ►
  • 23.
  • 24. Flags