Вы находитесь на странице: 1из 3

ECET 330 Final Exam New 2016

Download
1. (TCO 1) Dynamic memory requires _____ that is not needed for other types of memory
2. (TCO 1) Main memory in virtually all computers contains how many data bits at each address?
3. (TCO 1) In a CPU with a 16-bit program counter, what is the maximum, directly accessible code space?
4. (TCO 2) Which of the following is correct for the von Neumann architecture?
5. (TCO 2) Operations performed by the Control Unit include
6. (TCO 2) What direction does data flow on a WRITE bus cycle?
7. (TCO 3) For the CodeWarrior assembler
8. (TCO 3) The LDAB #$AA is _____-byte instruction
9. (TCO 3) Which statement about CodeWarrior assembly language is true?
10. (TCO 3) Which of the following is wrong?
1. (TCO 4) What is the value in Accumulator B after the execution of the code below?

ORG $2000
XYZ DC.B 0, 1, 2, 4
ORG $8000
LDY #XYZ
LDAA #04
LDAB #02
BACK ADDB 0, Y
INY
DECA
BNE BACK
HERE BRA HERE


2. (TCO 5) The instruction subb $100 will
3. (TCO 5) What will be the value in Accumulator A after the following program is executed?

ORG $2000
DATA1 DC.B $F8
ORG $8000
LDAA DATA1
LDAB #4
BACK LSLA
DECB
BNE BACK
HERE BRA HERE
4. (TCO 5) The MC9S12 instruction set has
5. (TCO 5) In the following program, what is the largest number that Register B can take?

L1 CLRA
NOP
NOP
DECB
BNE L1
6. (TCO 5) For a 16-bit signed number, we can use a maximum of _____ bits for the magnitude of the signed number
7. (TCO 8) Assume that PORTB has a value of 0x37. Which of the following gives us Unpacked BCD for 7?
8. (TCO 8) Fill in the blank to get 0x36 on PORTB.

unsigned char BCD_Byte = 0x67;


unsigned char x;
x= BCD_Byte & 0xF0;
_____;
PORTB = x | 0x30
9. (TCO 8) The following program creates square wave pulses on PB0. What is the duty cycle?

BACK

ORG

$8000

LDS

#$4000

LDAA

#$FF

STAA

DDRB

BSET

PORTB,%00000001


JSR

DELAY

JSR

DELAY

JSR

DELAY

BCLR

PORTB,%00000001

JSR

DELAY

BRA

BACK

10. (TCO 8) Find the value for PORTB after the execution of the following code:
PORTB = 0xAA ^ 0x55
1. (TCO 4) Write a program sequence that places the value in Address $2000 into Accumulator A and places the
value in Address $2001 into Accumulator B. Then, add these values together and store the result in Location $2002.
2. (TCO 5) Where is the return address of the subroutine stored when a subroutine is called? How is this return
address retrieved at the end of the subroutine?
3. (TCO 7) Write a C statement to set Bit 3 of variablefoowithout changing other bits.
4. (TCO 5) Write a HCS12 assembly-language program that counts all even numbers from a 10-variable, byte-sized
array and moves the odd numbers to a new array
5. (TCO 6) Write a C program for a HCS12 microcontroller that writes the value, 0x78, to Memory Location VAR1 and
then calls a delay function. The delay function should generate a delay of 0.25 milliseconds. Then, send the pattern
0x99 to Memory Location VAR2 and call the delay function one more time. Repeat this operation eight times using a
for loop. Assume that the bus clock frequency is 24MHz. Write the delay using inline assembly language.

Вам также может понравиться