Exercise_4_Questions-F09

Exercise_4_Questions-F09 - CE-320 Microcomputers I Fall B...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CE-320 Microcomputers I Fall B 2009 Exercise 4 Page 1 Do NOT use a calculator on this assignment. You will not be allowed to use one on the test or quizzes. Exercise 4 Questions 1. Do Exercises E2.6, E2.7, E2.9, E2.10, E2.13, E2.15, E.23 from the textbook. Define all addresses used in the programs as labels. 2. Trace the following code fragments showing all registers used and the N, Z, V, and C bits. Instead of showing the PC, simply give the code line of the next instruction to execute. a. 1: LDD #$7F80 2: ADDB #$80 3: ADCA #$00 b. 1: LDD #$5678 2: ADDB #$88 3: ADCA #$A9 c. 1: LDD #$0002 2: ADDB #$FF 3: ADCA #$FF d. 1: LDD #$00B0 2: ADDB #$50 3: ADCA #$00 e. 1: LDD #$FF80 2: ADDB #$80 3: ADCB #$00 f. 1: LDD #$7F7F 2: ADDB #$81 3: ADDA #$00 3. For each of the code fragments below, determine which of the 8 simple branches (BPL, BMI, BNE, BEQ, BVC, BVS, BCC, BCS) are taken, not taken, or cannot be determined. Note the Bxx is used to represent a generic branch instruction.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/12/2009.

Page1 / 3

Exercise_4_Questions-F09 - CE-320 Microcomputers I Fall B...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online