The CPU12 Microprocessor Core

Slides:



Advertisements
Similar presentations
Programming 8086 – Part IV Stacks, Macros
Advertisements

EECC250 - Shaaban #1 Lec # 6 Winter Stack-Related Instructions PEA Push Effective Address Calculates an effective address and pushes it.
EE 362 Microprocessor Systems and Interfacing © 1-1 Lecture 1: Introduction to Microprocessor Based Systems Microprocessor Architecture Microprocessor.
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Princess Sumaya University
H. Huang Transparency No.1-1 The 68HC11 Microcontroller Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Introducing the 68HC12 Chapter 1.
COMP3221: Microprocessors and Embedded Systems
EET 2261 Unit 2 HCS12 Architecture
COMP3221: Microprocessors and Embedded Systems--Lecture 9 1 COMP3221: Microprocessors and Embedded Systems Lecture 9: Data Transfer Instructions
ECE 265 – LECTURE 4 The M68HC11 Address Modes 8/14/ ECE265.
MICRO-CONTROLLER MOTOROLA HCS12 Addressing Modes Mechatronics Department Faculty of Engineering Ain Shams Univeristy.
© 2010 Kettering University, All rights reserved..
Module 10 Adapted By and Prepared James Tan © 2001.
© 2010 Kettering University, All rights reserved..
ME4447/6405 The George W. Woodruff School of Mechanical Engineering ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics.
The Intel Microprocessors. Real Mode Memory Addressing Real mode, also called real address mode, is an operating mode of and later x86-compatible.
Microprocessor Architecture BTEC National Diploma IT Practitioners.
The 8051 Microcontroller and Embedded Systems
ECE 265 – LECTURE 3 68HC11 Address Space, Memory, Registers, and data transfers 3/29/ ECE265.
ME4447/6405 The George W. Woodruff School of Mechanical Engineering ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
A Brief History of Microprocessors Lecture L11.0 Sections 1.1, 9.1.
ECE 265 – LECTURE 5 The M68HC11 Basic Instruction Set 12/8/ ECE265.
Addressing Modes MTT CPU08 Core Motorola CPU08 ADDRESSING MODES.
1 ECE 372 – Microcontroller Design Assembly Programming HCS12 Assembly Programming Addressing Modes Stack Operations Subroutines.
EE 345 Class Notes EE345 Midterm Review Dr. Jane Dong.
1 Introduction to Microcontroller Microcontroller Fundamentals & Programming.
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
Embedded Systems Lecture 5 January 25 th, 2016.
Subroutines and Stacks. Stack The stack is a special area in memory used by the CPU to store register information or general data information during program.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Internal Programming Architecture or Model
EE345 Chapter 2 Lecture 3 April 4. Quiz every Wednesday 1 quiz = 1% extra credit five quizzes before midterm  5% for midterm. five quizzes before final.
EE345 Chapter 2 Lecture 3 April Instruction and addressing modes 1.Extended Addressing 2.Direct Addressing 3.Inherent Addressing 4.Immediate Addressing.
EET 2261 Unit 6 The Stack; Subroutines
Programmable System on Chip
CS 140 Lecture Notes: Virtual Memory
ECE 3430 – Intro to Microcomputer Systems
Part of the Assembler Language Programmers Toolbox
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
Computer Organization & Assembly Language Chapter 3
University of Gujrat Department of Computer Science
Chapter 3 Addressing Modes
CS 140 Lecture Notes: Virtual Memory
ME4447/6405 Microprocessor Control of Manufacturing Systems and
Memory organization On- chip memory Off-chip memory
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
ADDRESSING MODES AND INSTRUCTION SET
CS 140 Lecture Notes: Virtual Memory
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
8085 MICROPROCESSOR 8085 CPU Registers and Status Flags S Z AC P C A B
COMP3221: Microprocessors and Embedded Systems
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
Computer Architecture CST 250
CPU has 6 special locations called registers
Chapter 4: Computer Architecture
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
EET 2261 Unit 6 The Stack; Subroutines
Instruction Set Summary
CS 140 Lecture Notes: Virtual Memory
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
(The Stack and Procedures)
Presentation transcript:

The CPU12 Microprocessor Core Lecture L2.1

Reference S12CPUV2 Reference Manual S12CPUV2.pdf (in .zip file) Print out Appendix A – Instruction Reference It will answer all questions concerning HCS12 instructions and addressing modes

Introducing the CPU12 The CPU12 Registers CPU12 Addressing Modes CPU12 Instructions

The 68HC12 Registers

Condition Code Register

The 68HC12 Accumulators A c c u m u l a t o r A A B A c c u m u l a t D D

Index Registers, X and Y I n d e x r e g i s t e r X X I n d e x r e g

S t a c k P o i n t e r S P Stack Pointer, SP

Introducing the CPU12 The CPU12 Registers CPU12 Addressing Modes CPU12 Instructions

Pre-decrement indexed addressing

Using X as a stack pointer for a data stack LDY 2,X+ will pop $1234 into Y

MOVW 0,X,2,-X

LDD 0,X MOVW 2,X,0,X STD 2,X

MOVW 2,X,2,-X

Introducing the CPU12 The CPU12 Registers CPU12 Addressing Modes CPU12 Instructions

Load Accumulator A 1: ; LDAA Addressing Modes 2: =00004000 ORG $4000 5: 4004 B6 5678 LDAA $5678 6: 4007 A6 03 LDAA 3,X 7: 4009 A6 E9 38 LDAA -200,Y 8: 400C A6 F2 1234 LDAA $1234,SP 9: 4010 A6 E7 LDAA [D,X] 10: 4012 A6 EB 2345 LDAA [$2345,Y]

1: ; LDAA Addressing Modes 2: =00004000 ORG $4000 3: 4000 86 35 LDAA #$35 4: 4002 96 A3 LDAA $A3 5: 4004 B6 5678 LDAA $5678 6: 4007 A6 03 LDAA 3,X 7: 4009 A6 E9 38 LDAA -200,Y 8: 400C A6 F2 1234 LDAA $1234,SP 9: 4010 A6 E7 LDAA [D,X] 10: 4012 A6 EB 2345 LDAA [$2345,Y] 200 = $C8 = 11001000 9-bit = 011001000 2’s comp = 100111000 = $138 11101001 = $E9

11110010 = $F2 1: ; LDAA Addressing Modes 2: =00004000 ORG $4000 4: 4002 96 A3 LDAA $A3 5: 4004 B6 5678 LDAA $5678 6: 4007 A6 03 LDAA 3,X 7: 4009 A6 E9 38 LDAA -200,Y 8: 400C A6 F2 1234 LDAA $1234,SP 9: 4010 A6 E7 LDAA [D,X] 10: 4012 A6 EB 2345 LDAA [$2345,Y] 11110010 = $F2

11100111 = $E7 1: ; LDAA Addressing Modes 2: =00004000 ORG $4000 4: 4002 96 A3 LDAA $A3 5: 4004 B6 5678 LDAA $5678 6: 4007 A6 03 LDAA 3,X 7: 4009 A6 E9 38 LDAA -200,Y 8: 400C A6 F2 1234 LDAA $1234,SP 9: 4010 A6 E7 LDAA [D,X] 10: 4012 A6 EB 2345 LDAA [$2345,Y] 11100111 = $E7

11101011 = $EB 1: ; LDAA Addressing Modes 2: =00004000 ORG $4000 4: 4002 96 A3 LDAA $A3 5: 4004 B6 5678 LDAA $5678 6: 4007 A6 03 LDAA 3,X 7: 4009 A6 E9 38 LDAA -200,Y 8: 400C A6 F2 1234 LDAA $1234,SP 9: 4010 A6 E7 LDAA [D,X] 10: 4012 A6 EB 2345 LDAA [$2345,Y] 11101011 = $EB