HC11 Programming.

Slides:



Advertisements
Similar presentations
© 2010 Kettering University, All rights reserved..
Advertisements

H. Huang Transparency No.1-1 The HCS12/MC9S12 Microcontroller Copyright © 2010 Delmar Cengage Learning HCS12 Instruction Examples The LOAD and STORE Instructions.
Ch.3 Representation and Manipulation of Information From Introduction to Embedded Systems: Interfacing to the Freescale 9s12 by Valvano, published by CENGAGE.
EET 2261 Unit 5 Tables; Decision Trees & Logic Instructions
Revised: Aug 1, EE4390 Microprocessors Lesson 6,7 Instruction Set, Branch Instructions, Assembler Directives.
HCS12 Arithmetic Lecture HC12 Arithmetic Addition and Subtraction Shift and Rotate Instructions Multiplication Division.
Addressing Modes & Instruction Set By: Prof. Mahendra B. Salunke Asst. Prof., Department of Computer Engg., SITS, Pune-41 URL:
HCS12 Instruction set.
© 2010 Kettering University, All rights reserved..
Assembler Programming Chapter 6. EEL-4746 Best Practices.
The 68HC11 Microcontroller Minnesota State University, Mankato
H. Huang Transparency No.1-1 The 68HC11 Microcontroller Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
Chapter 1 Introduction to HCS12/MC9S12. Computer Hardware Organization What is a Computer? Software Hardware.
Chapter 2 HCS12 Assembly Programming
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 Arithmetic Chapter 3.
Microcontroller Fundamentals & Programming
ECE 265 – LECTURE 7 The M68HC11 Basic Instruction Set Logical, Shift and Rotate, Data Testing 8/14/ ECE265.
© 2010 Kettering University, All rights reserved..
The M68HC11 Basic Instruction Set Basic Arithmetic Instructions
MC68HC11 Instruction Set.
Chapter 2: 68HC11 Assembly Programming
H. Huang Transparency No.2-1 The 68HC11 Microcontroller Chapter 2: 68HC11 Assembly Programming The 68HC11 Microcontroller.
Lab 1 – Assembly Language and Interfacing Start date: Week 3 Due date: Week 4 1.
Basic Microcontroller System
Physics 413 Chapter 1: Introduction to the HCS 12 Microcontroller.
ME4447/6405 The George W. Woodruff School of Mechanical Engineering ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics.
Microprocessors A microprocessor is essentially a computer on a single chip. It is also an example of a complex finite state machine or clocked sequential.
ECE 265 – LECTURE 8 The M68HC11 Basic Instruction Set The remaining instructions 10/20/ ECE265.
ECE Lecture 13 Motorola 68HC11. Resources 68HC11 E-series Reference Guide and if necessary 68HC11 E-series Technical Data 68HC11 Reference Manual.
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 7.
© 2010 Kettering University, All rights reserved..
ECE 447: Lecture 12 Logic, Arithmetic, Data Test and Control Instructions of MC68HC11.
ME4447/6405 The George W. Woodruff School of Mechanical Engineering ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics.
ECE 265 – LECTURE 5 The M68HC11 Basic Instruction Set 12/8/ ECE265.
ECE 265 – LECTURE 11 Editing and the Assembler (updated 11/11/10) 12/15/ ECE265.
Machine Language ELEC 330 Digital Systems Engineering Dr. Ron Hayne.
ELE22MIC Lecture 24 Course Review 1 –Review Addressing Modes operation –Instruction Set Categories & instructions Review of Assignment 1 & 2 Assignment.
EE 345 Class Notes EE345 Midterm Review Dr. Jane Dong.
Microcontroller Fundamentals & Programming Arithmetic Instructions.
ELE22MIC Lectures 6 and 7 Assembly Language Instruction Set Overview, Part 3 –Addressing Modes –Add, Push, Pull, Jump –Conditional Jumps.
Advanced Assembly Language Programming
Arithmetic and Logic Chapter 5
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
Embedded Systems Lecture 5 January 25 th, 2016.
HCS12 Technical Training Module 3 - Instruction Set, Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other.
EE345 Chapter 2 Lecture 3 April Instruction and addressing modes 1.Extended Addressing 2.Direct Addressing 3.Inherent Addressing 4.Immediate Addressing.
The 68HC11 Microcontroller Minnesota State University, Mankato
CPU12 Instruction Set Overview
Addressing Modes in Microprocessors
Status Register Status = system byte (supervisor only) + user byte = system status + condition code register usually, it is not important to know.
ECE 3430 – Intro to Microcomputer Systems
The 68HC11 Microcontroller Minnesota State University, Mankato
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
Overview Introduction General Register Organization Stack Organization
Arithmetic and Logic Chapter 5
68000 Arithmetic Instructions
Branching and Looping Lecture L3.2.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME4447/6405 Microprocessor Control of Manufacturing Systems and
Branching and Loops.
ECE 3430 – Intro to Microcomputer Systems
Interrupt-Driven State Machine
Physics 413 Chapter 2.
Arithmetic and Logic Chapter 5
HCS12 Instruction set.
Indexing Through Memory
Principles of Computers 17th Lecture
Presentation transcript:

HC11 Programming

HC11 Registers

Data Movement LDAA LDAB LDD LDS LDX LDY STAA STAB STD STS STX STY

Describe what each of the following instructions accomplishes and then indicate the addressing mode used, effective address(es) of operand, the operand and resulting status in CCR, given the following; 00F0 00112233445566778899AABBCCDDEE 0140 5678F245A4B4C3229A9C9B2DAB2398 LDAA #$2C LDAA $F6 LDAA $0143 LDY $0140 LDX $F0

Describe what each of the following instructions accomplishes and then indicate the addressing mode used, effective address(es) of operand, the operand, result and resulting status in CCR, given the following; D = 1A68 X = 3C6A Y = 15AB STAA $18 STAB $04AB STD $03B7 STY $0460 STX $058A

Write the address and the machine code for the source program shown below; ORG $0200 LDAA $0120 STAA $400 LDX $01 STX $0500 LDAB #$45 STAB $0460 LDD $30 STD $0560

Draw the flowchart and write the program that will copy two bytes from $0110 to $0120. Assemble the code starting at location $0200.

Clear Instructions CLRA CLRB CLR

Transfer Instructions TAB TBA TAP TPA TSX TSY TXS TYS

Exchange instructions XGDY XGDX

Describe what each of the following instructions accomplishes and then indicate the addressing mode used, effective address(es) of operand, the operand, result and resulting status in CCR, given the following; * D = AC23 * 0050 23 34 13 65 A4 C4 28 09 03 05 * CCR = 09 ORG $0200 0200 4F CLRA 0201 16 TAB 0202 CE 17 AC LDX #$17AC 0205 8F XGDX 0206 7F 00 56 CLR $56

Add Instructions ADDA ADDB ADDD ADCA ADCB ABA ABX ABY

Describe what each of the following instructions accomplishes and then indicate the addressing mode used, effective address(es) of operand, the operand, result and resulting status in CCR, given the following; * A = 24 * B = A3 * X = 2AC6 * Y = 19A2 * CCR = 09 * 0090 12 00 87 A4 98 4E 5C 45 87 F4 65 77 43 09 04 68 * 0120 80 67 D4 C2 A6 06 03 45 67 8C 9B 23 54 77 88 D2 ORG $0250 0250 8B 65 ADDA #$65 0252 DB 9A ADDB $9A 0254 F3 01 28 ADDD $0128 0257 3A ABX

Increment Instructions INCA INCB INS INX INY INC

Subtraction Instructions SUBA SUBB SUBD SBA

Describe what each of the following instructions accomplishes and then indicate the addressing mode used, effective address(es) of operand, the operand, result and resulting status in CCR, given the following; * A = 7A * B = A3 * X = 2AC6 * Y = 19A2 * CCR =09 * 0090 12 00 87 A4 98 4E 5C 45 87 F4 65 77 43 09 04 68 * 0120 80 67 D4 C2 A6 06 03 45 67 8C 9B 23 54 77 88 D2 ORG $0250 0250 80 65 SUBA #$65 0252 D0 93 SUBB $93 0254 B3 01 28 SUBD $0128

Negate Instructions NEGA NEGB NEG

Decrement Instructions DECA DECB DES DEX DEY DEC

Describe what each of the following instructions accomplishes and then indicate the addressing mode used, effective address(es) of operand, the operand, result and resulting status in CCR, given the following; * A = 7A * B = A3 * X = 2AC6 * Y = 19A2 * CCR = 09 * 0090 12 00 87 A4 98 4E 5C 45 87 F4 65 77 43 09 04 68 * 0120 80 67 D4 C2 A6 06 03 45 67 8C 9B 23 54 77 88 D2 ORG $0250 0250 4A DECA 0251 09 DEX 0252 70 01 25 NEG $0125 0255 18 08 INY

Logic Instructions ANDA ANDB ORAA ORAB EORA EORB COMA COMB COM

Example * A = 7A * B = A3 * X = 2AC6 * Y = 19A2 * CCR = 09 * 0090 12 00 87 A4 98 4E 5C 45 87 F4 65 77 43 09 04 68 * 0120 80 67 D4 C2 A6 06 03 45 67 8C 9B 23 54 77 88 D2 ORG $0250 0250 84 8F ANDA #%10001111 0252 53 COMB 0253 B8 01 24 EORA $0124

Logical Shift Instructions LSLA LSLB LSLD LSL LSRA LSRB LSRD LSR

Arithmetic Shift Instructions ASRA ASRB ASR

Rotate Instructions ROLA ROLB ROL RORA RORB ROR

Describe what each of the following instructions accomplishes and then indicate the addressing mode used, effective address(es) of operand, the operand, result and resulting status in CCR, given the following; * A = 7A * B = A3 * X = 2AC6 * Y = 19A2 * CCR = 09 * 0090 12 00 87 A4 98 4E 5C 45 87 F4 65 77 43 09 04 68 * 0120 80 67 D4 C2 A6 06 03 45 67 8C 9B 23 54 77 88 D2 ORG $0250 0250 48 LSLA 0251 44 LSRA 0252 78 00 9A LSL $9A 0255 77 01 23 ASR $0123 0258 49 ROLA 0259 56 RORB

Multiplication and Division Instructions IDIV FDIV

Status Flag Instructions CLC SEC CLV SEV

Problems Chapter Questions Pages 88,89 Problems 1,2,3,5,9,12,14,17,27,28 Chapter Problems Pages 89,90,91 Problems 2,4,5,8,11,12