© 2010 Kettering University, All rights reserved..

Slides:



Advertisements
Similar presentations
Fill in missing numbers or operations
Advertisements

Intel 8086.
Sequential Logic Design
Copyright © 2013 Elsevier Inc. All rights reserved.
Multiplication X 1 1 x 1 = 1 2 x 1 = 2 3 x 1 = 3 4 x 1 = 4 5 x 1 = 5 6 x 1 = 6 7 x 1 = 7 8 x 1 = 8 9 x 1 = 9 10 x 1 = x 1 = x 1 = 12 X 2 1.
Division ÷ 1 1 ÷ 1 = 1 2 ÷ 1 = 2 3 ÷ 1 = 3 4 ÷ 1 = 4 5 ÷ 1 = 5 6 ÷ 1 = 6 7 ÷ 1 = 7 8 ÷ 1 = 8 9 ÷ 1 = 9 10 ÷ 1 = ÷ 1 = ÷ 1 = 12 ÷ 2 2 ÷ 2 =
/4/2010 Box and Whisker Plots Objective: Learn how to read and draw box and whisker plots Starter: Order these numbers.
Half Life. The half-life of a quantity whose value decreases with time is the interval required for the quantity to decay to half of its initial value.
1 1  1 =.
1  1 =.
© 2010 Kettering University, All rights reserved..
© 2010 Kettering University, All rights reserved..
Bell Schedules Club Time is available from 8:05-8:20  1 st 8:20 – 9:15  2 nd 9:20 – 10:10  3 rd 10:15 – 11:05  4 th 11:10 – 12:50 A(11:10)
Bottoms Up Factoring. Start with the X-box 3-9 Product Sum
X-box Factoring. X- Box 3-9 Product Sum Factor the x-box way Example: Factor 3x 2 -13x (3)(-10)= x 2x 3x 2 x-5 3x +2.
Select a time to count down from the clock above
H. Huang Transparency No.1-1 The HCS12/MC9S12 Microcontroller Copyright © 2010 Delmar Cengage Learning HCS12 Instruction Examples The LOAD and STORE Instructions.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
Class Addressing modes
Microprocessors.
© 2010 Kettering University, All rights reserved..
ELEC 330 Digital Systems Engineering Dr. Ron Hayne
© 2010 Kettering University, All rights reserved..
EET 2261 Unit 5 Tables; Decision Trees & Logic Instructions
Revised: Aug 1, EE4390 Microprocessors Lesson 6,7 Instruction Set, Branch Instructions, Assembler Directives.
Addressing Modes & Instruction Set By: Prof. Mahendra B. Salunke Asst. Prof., Department of Computer Engg., SITS, Pune-41 URL:
© 2010 Kettering University, All rights reserved..
© 2010 Kettering University, All rights reserved..
68HC11 Polling and Interrupts
© 2010 Kettering University, All rights reserved..
Programming the HC12 in C. Some Key Differences – Note that in C, the starting location of the program is defined when you compile the program, not in.
EET 2261 Unit 2 HCS12 Architecture
Microcontroller Fundamentals & Programming
ECE 265 – LECTURE 7 The M68HC11 Basic Instruction Set Logical, Shift and Rotate, Data Testing 8/14/ ECE265.
ARM Instructions I Prof. Taeweon Suh Computer Science Education Korea University.
© 2010 Kettering University, All rights reserved..
The M68HC11 Basic Instruction Set Basic Arithmetic Instructions
© 2010 Kettering University, All rights reserved..
© 2010 Kettering University, All rights reserved..
Computer Architecture Lecture 13 – part 2 by Engineer A. Lecturer Aymen Hasan AlAwady 7/4/2014 University of Kufa - Information Technology Research and.
Computer Architecture and the Fetch-Execute Cycle
9/20/6Lecture 3 - Instruction Set - Al Instruction Set (2)
© 2010 Kettering University, All rights reserved..
© 2010 Kettering University, All rights reserved..
ECE 447: Lecture 12 Logic, Arithmetic, Data Test and Control Instructions of MC68HC11.
Computer Architecture Lecture 11 by Engineer A. Lecturer Aymen Hasan AlAwady 10/3/2014 University of Kufa - Information Technology Research and Development.
ECE 265 – LECTURE 5 The M68HC11 Basic Instruction Set 12/8/ ECE265.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Advanced Assembly Language Programming
© 2010 Kettering University, All rights reserved..
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
PROGRAMMING THE BASIC COMPUTER
Assembly Language Programming of 8085
Microprocessor T. Y. B. Sc..
ECE 3430 – Intro to Microcomputer Systems
General Purpose I/O.
ECE 3430 – Intro to Microcomputer Systems
8051 Addressing Modes The way, using which the data source or destination addresses are specified in the instruction mnemonic for moving the data, is.
Microcomputer Programming
Instruction Formats Each instruction consists of two parts:
68000 Arithmetic Instructions
The Processor and Machine Language
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
CS-401 Computer Architecture & Assembly Language Programming
ECE 3430 – Intro to Microcomputer Systems
Chapter 4: Representing instructions
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Presentation transcript:

© 2010 Kettering University, All rights reserved.

Microcomputers I – CE 320 Electrical and Computer Engineering Kettering University Jaerock Kwon, Ph.D.

Announcements Quiz 3 30 mins (10:45 AM ~ 11:15 AM)

Lecture 13 : Special Bit Instructions

Todays Goals Learn bit-set and bit-clear instructions Branch on bit instructions

Bit Manipulate Instructions BSET (M (M) + (mm)) Set to 1 bits in a memory location BCLR (M (M) · (mm)) Clear to 0 bits in a memory location Note that … They can only be used on data in memory. Use AND and OR instructions for setting/clearing bits on registers. Therefore, two operands are needed. 1 st : the address 2 nd : immediate mask value In the mask byte, 1 means to affect the bit 0 means preserve the bit Examples BSET0,X, $81; $81 = % BCLR0,Y, $33; $33 = % Set or clear bits in a memory byte

Bit Test Instructions BITA ((A) · (M)) Bit test A Test bits without altering the value of the register. BITB ((B) · (M)) Bit test B Test bits without altering the value of the register. Examples BITA#$44 ; $44 = % Tests the bit 6 and 2 of register A. Updates Z and N bits of CCR accordingly. Note that… Like comparison instructions, the result is discarded. CCR bits are affected by the instructions. Test bits

Bit Condition Branch Instructions Make branch decisions based on the value of bits. BRCLR, BRSET Perform bitwise logical AND on the contents of the specified memory location and the mask supplied with the instruction. BRCLR: branch if (M) · (mm) = 0[if selected bit(s) clear] BRSET: branch if (M) · (mm) = 0[if selected bit(s) set] Examples here brclr $66,$80,here ldd $70 ;; loop inc count … brset $66,$e0,loop … Note: The first operand is an address.

Examples Turn on the cabin light without affecting other bits Two door sport car BSET$00, % ; $ $0000GBOXDLEFTDRGHTDTRNKD-GBOXLCBNLTRNKL

Examples Turn off the glove box light and trunk light without affecting other bits Two door sport car BCLR$00, % ; $ $0000GBOXDLEFTDRGHTDTRNKD-GBOXLCBNLTRNKL

Examples Turn on the cabin light if either door is open (=the bit is set) Two door sport car LDAA$00 BITA#% ; #$60 BNECBNLON BRASKIP CBNLON:BSET$00, % ; $02 SKIP: $0000GBOXDLEFTDRGHTDTRNKD-GBOXLCBNLTRNKL

Examples Turn off the cabin light if both doors are closed Two door sport car BRCLR$00, % , CBNLOFF BRASKIP CBNLOFF:BCLR$00, % SKIP: $0000GBOXDLEFTDRGHTDTRNKD-GBOXLCBNLTRNKL

Examples Turn on the cabin light if both doors are open Two door sport car BRSET#% CBNLON BRASKIP CBNLON:BSET$00, % ; $02 SKIP: $0000GBOXDLEFTDRGHTDTRNKD-GBOXLCBNLTRNKL

Questions?

Wrap-up Bit set/clear instructions Bit condition branch instructions What weve learned

What to Come Stack Subroutines