ECE 265 – LECTURE 5 The M68HC11 Basic Instruction Set 12/8/2015 1 ECE265.

Slides:



Advertisements
Similar presentations
EET 2261 Unit 6 The Stack; Subroutines
Advertisements

Microprocessors.
INSTRUCTION SET ARCHITECTURES
9/20/6Lecture 3 - Instruction Set - Al Instruction Set.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 1: Bits, bytes and a simple processor dr.ir. A.C. Verschueren.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Chapter 2.2 Machine Language.
What is an instruction set?
EET 2261 Unit 2 HCS12 Architecture
ECE 265 – LECTURE 7 The M68HC11 Basic Instruction Set Logical, Shift and Rotate, Data Testing 8/14/ ECE265.
ECE 265 – LECTURE 4 The M68HC11 Address Modes 8/14/ ECE265.
Lecture 18 Last Lecture Today’s Topic Instruction formats
The M68HC11 Basic Instruction Set Basic Arithmetic Instructions
© 2010 Kettering University, All rights reserved..
Machine Instruction Characteristics
Instruction Set Architecture
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
9/20/6Lecture 3 - Instruction Set - Al Instruction Set (2)
ECE 265 – LECTURE 8 The M68HC11 Basic Instruction Set The remaining instructions 10/20/ ECE265.
Physics 413 Chapter 4 A Fork in the Road LDAB # $ 13 here :ADDA # $ 24 DEC B BNE here WAI BNE is the new instruction. Branch if not equal to zero.
ECE 447: Lecture 12 Logic, Arithmetic, Data Test and Control Instructions of MC68HC11.
ECE 265 – LECTURE 3 68HC11 Address Space, Memory, Registers, and data transfers 3/29/ ECE265.
Computer Architecture Lecture 13 – part 1 by Engineer A. Lecturer Aymen Hasan AlAwady 31/3/2014 University of Kufa - Information Technology Research and.
Computer Architecture and Organization
Computer Architecture EKT 422
ECE 265 Midterm Review 12/1/ ECE265. Administrivia  The grade for quiz 3 was not entered into to Carmen before I handed them back.  I realize.
1 Stacks, Subroutines, I/O Routines Today: First Hour: Stacks, Subroutines –Section 3.9,3.10 of Huang’s Textbook –In-class Activity #1 Second Hour: I/O.
1 ECE 372 – Microcontroller Design Assembly Programming HCS12 Assembly Programming Addressing Modes Stack Operations Subroutines.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Advanced Assembly Language Programming
What is a program? A sequence of steps
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
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.
1 Stack Advanced Programming. 2 The Stack It is a special area of memory used as temporary storage A stack is a LIFO data structure Putting data into.
Revised: Aug 1, EE4390 Microprocessors Lessons 11, 12 Advanced Assembly Programming.
CSC 221 Computer Organization and Assembly Language Lecture 06: Machine Instruction Characteristics.
Stacks and Subroutines May 23. Stacks and subroutine usage The stack is a special area of the random access memory in the overall memory system The stack.
EET 2261 Unit 6 The Stack; Subroutines
Unit 1 Instruction set M.Brindha AP/EIE
3.Instruction Set of 8085 Consists of 74 operation codes, e.g. MOV
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
Lecture Set 5 The 8051 Instruction Set.
Microcomputer Programming
Overview Introduction General Register Organization Stack Organization
Overview Introduction General Register Organization Stack Organization
Computer Organization and Design
CS-401 Assembly Language Programming
The CPU12 Microprocessor Core
Central Processing Unit
Chapter 8 Central Processing Unit
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
ECEG-3202 Computer Architecture and Organization
The ARM Instruction Set
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
EET 2261 Unit 6 The Stack; Subroutines
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
8/23/
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

ECE 265 – LECTURE 5 The M68HC11 Basic Instruction Set 12/8/ ECE265

Lecture Overview  The M68HC11 Basic Instruction Set  How to partition the instruction set to learn it  What are those partitions  The 68HC11 data movement instructions  Material from Chapter 2 and 3 plus a 68HC11 reference manual. Instruction set details are in Appendix A of the text. 12/8/ ECE265

Basic guide to any architecture  The instruction set of any processor can be partitioned into logical groupings.  Instructions for  Data Movement – no operation or manipulation – just transfer the data from one location to another  Arithmetic – an take note of any unique aspects – most architecture treat data such that it is treated as 2’s complement.  Multiply and Divide – if these are supported by instructions.  Logical Instructions – Boolean operations  Testing and Bit Manipulation – even in the CCR  Shift and Rotate 12/8/2015ECE265 3

Basic guide (cont.)  Instruction classes continued  Condition Code Register  Branch – what conditional branches are supported  Jump – direct? How different from Branch?  Subroutine Calls and Return – calls that save register and data and calls that don’t.  Stack Pointer  Index Register and Indexed access to data  Interrupts and Interrupt Handling  Any miscellaneous instructions 12/8/2015ECE265 4

Data Movement  These instructions allow for the transfer of data from one location to another.  In a RISC (Reduced Instruction Set Computer) these transfers are the only data movement instructions. Operational instructions are typically register to register with both operands being in register to start.  In a CISC (Complex Instruction Set Computer) there are complex instruction that not only perform the operation on data but also result in complex data movement and/or storage. 12/8/2015ECE265 5

Data Movement Instructions  These are listed in the table for the 68HC11. 12/8/2015ECE265 6

CLR  Operation: ACCX  0 or M  0  Description: The contents of the accumulator or the memory location are set to 0s.  CC effects: N, V, C are cleared, Z is set  Forms: CLRA CLRB CLR 12/8/2015ECE265 7

Load data  Operation: place the operand data into accumulator A, B, or D.  Description: Load the accumulator  CC effects: V cleared, N and Z set or cleared depending on value of data.  Forms: LDAA LDAB LDD 12/8/2015ECE265 8

Example of load 12/8/2015ECE265 9

Store data  Operation: Store the accumulator at the effective address.  Forms: STAA  STAB  STD 12/8/2015ECE265 10

The Stack  The stack is an area of RAM used for temporary storage, typically for subroutine calls and then the subsequent return. It is also used when servicing and interrupt.  One of the Programmers Model registers is the stack pointer register. This is a 16-bit register that points to the next free location on the stack. The stack grows down in memory. 12/8/2015ECE265 11

Stack and stack growth  Two important facts to note on stacks.  Direction of growth  What does the stack pointer point to Data Free location 12/8/2015ECE265 12

Push and Pop  Two common operations on stacks are to add data, a Push, and the retrieval of data, a Pop.  For the 68HC11  A PUSH – Simply store the data at the address pointed to by the stack pointer. After storing the data, decrement the stack pointer.  A POP – Increment the stack pointer. Use the data that the stack pointer now points to. Location is now considered free. 12/8/2015ECE265 13

Push and Pull  Operation: A/B  Mem(SP) Pull  Mem(SP)  A/B Push  Description: Transfers the contents of the Accumulator to or from the top of the stack.  CC effects: none  Forms: this is an inherent instruction  PSHA PSHB PULA PULB 12/8/2015ECE265 14

Store the Accumulator  Operation: Mem(ea)  A/B  Description: Store the contents of the given accumulator in the effective memory address  CC effects: N V Z  Forms: STAA STAB STD 12/8/2015ECE265 15

Transfer register  Operation: Transfers allowed are  from A to B or CCR  from B to A  from CCR to A  Description: Transfers the contents of one register to another.  CC effects: A to B and B to A  N V Z  Forms: only inherent 12/8/2015ECE265 16

Exchange registers  Operation: D  X concurrent with X  D  D  Y concurrent with Y  D  Description: Exchange the contents of the D accumulator with the X or Y index register  CC effects: None  Forms: Inherent form instruction 12/8/2015ECE265 17

Lecture summary 12/8/2015ECE  Have covered  How to partition the instruction set when learning an architecture.  The data transfer instructions

Assignment 12/8/2015ECE  Read Chapter 3 through section 3.4  Problems  3.3  3.4  3.5  3.6