Quiz 4 1
Download
1 / 6

Quiz 4 .1 - PowerPoint PPT Presentation


  • 67 Views
  • Uploaded on

Quiz 4 .1. Four LEDs are attached to Port 4, bits 0 thru 3. Indicate which LEDs are ON/OFF/Undefined after each instruction to the left is executed. P4.3. P4.2. P4.1. P4.0. mov.b #0x0f,& P4DIR and.b #0xf0,& P4OUT bis.b # 0x09,& P4OUT xor.b # 0x0f,& P4OUT bic.b # 0x06,& P4OUT

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Quiz 4 .1' - hannah-peck


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Quiz 4 1
Quiz 4.1

Four LEDs are attached to Port 4, bits 0 thru 3. Indicate which LEDs are ON/OFF/Undefined after each instruction to the left

is executed.

P4.3

P4.2

P4.1

P4.0

  • mov.b #0x0f,&P4DIR

  • and.b #0xf0,&P4OUT

  • bis.b #0x09,&P4OUT

  • xor.b #0x0f,&P4OUT

  • bic.b #0x06,&P4OUT

  • add.b #0x03,&P4OUT


Quiz 4 2
Quiz 4.2

  • Given a 1.2 MHz processor, what value for DELAY would result in a 1/4 second delay?

?

DELAY .equ

mov.w #DELAY,r12 ; 2 cycles

delay1: mov.w #1000,r15 ; 2 cycles

delay2: sub.w #1,r15 ; 1 cycle

jne delay2 ; 2 cycles

sub.w #1,r12 ; 1 cycle

jne delay1 ; 2 cycles


Quiz 4 3
Quiz 4.3

  • ALU

  • Clocks

  • Control

  • I/O

  • Memory

  • Peripherals

  • Registers

  • Address space

  • Execution speed

  • External devices

  • Fast memory

  • Finite State Machine

  • Memory mapped

  • Word length

  • Match the following terms:


Quiz 4 4
Quiz 4.4

  • add.w tab(r10),r9

  • and.w &mask,r12

  • bis.b #0x08,r6

  • mov.b cnt,r11

  • mov.w r4,r5

  • mov.w #100,r14

  • sub.w @r4+,r5

  • xor.b @r8,r15

  • Absolute

  • Constant

  • Immediate

  • Indexed register

  • Indirect auto-increment

  • Indirect register

  • Register

  • Symbolic

  • Match the following source operand modes:


Quiz 4.5

Present the destination operand of the following instruction to the ALU:

add.w r4,cnt ; M[cnt] += r4

Memory

CPU

PC

PC

PC

PC

ADDER

Registers

IR

0x5480

PC

0x5480

0x0218

R4

cnt

ALU


Quiz 4 6
Quiz 4.6

Show how to retrieve a PC-relative destination operand from memory and present to the ALU:


ad