# HW#8_Sol - (f[ACCD = A97A = 1010100101111010 after shift...

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

EE 367 Introduction to Microprocessors (Fall 2011) Solution Set, Homework 8 7.9, The LDX #8F00 instruction produces [X] = 8F00 and the STX \$FE instruction stores [X] in location 00FE and 00FF (i.e [00FE] = 8F and [00FF] = 00). The LDAA \$FE instruction loads ACCA from address 00FE so that [ACCA]= 8F and LDAB \$FF loads ACCB from address 00FF so that [ACCB] = 00. ACCD is the concatenation of A and B. Hence [ACCD] = 8F00. 7.15, (a) 8B 20 (c) 0A (l) CD AC 45 7.21, You can chnage first instruction to LDS #0286. Then interchange PSHA and PSHB so that ACCB gets pushed onto stack first. 7.43, (a) [0670] = 73 = 01110011: after shift – [0670] = 11100110 = E6, and C = 0. (b) [ACCB] = 7A = 01111010: after shift – [ACCB] = 00111101 = 3D, and C = 0. (c) [ACCB] = 7A = 01111010: after shift – [ACCB] = 00111101 = 3D, and C = 0. (d) Operand address = 0600 + 70 = 0670 [0670] = 73 = 01110011: after rotate – [0670] = 11100110 = E6, and C = 0. (e) [ACCA] = A9 = 10101001: after rotate – [ACCA] = 01010100 = 54, and C = 1.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (f) [ACCD] = A97A = 1010100101111010: after shift – [ACCD] = 0101010010111101, and C = 0. 7.93, (a) To achieve a 5ms delay, we want 5ms/0.5μs = 10,000 cycles Delay. 10,000 = 2+(Count * TL) Count * TL = 9,980 If we choose a COUNT = FA = 250 then TL = 9,980 cycles/250 = 40 Thus, we can add 17 NOPs (34 clock cycles) to the loop to achieve TL = 40. The exact delay will be: 2 + (250 * 41) = 5.126ms. (b) Refer to the second Program of Example 2.53. Using the X register: To achieve a 4ms delay, we want 4ms/0.5μs = 8,000 cycles delay. 8,000 = TE + (COUNT * TL) 8,000 = 3 + (COUNT * 8); COUNT = 999.6 The nearest integer value is COUNT 1000 = 03E8 (in Hex), the actual total delay will be 3 + (1000 * 8) = 8003 cycles = 4.002 ms. Using the Y register: 8,000 = TE + (COUNT * TL) 8,000 = 4 + (COUNT * 9); COUNT = 888.4 The nearest integer value is COUNT 888 = 0378 (in Hex), the actual total delay will be 4 + (888 * 9) = 7996 cycles = 3.998 ms....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

HW#8_Sol - (f[ACCD = A97A = 1010100101111010 after shift...

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

View Full Document
Ask a homework question - tutors are online