Question 1. Question : (TCO 1) Dynamic memory requires _ that is not needed for other types of memory.

 Student Answer:    refresh

           data bus buffer

           address decoder

           dual power supply

Question 2. Question : (TCO 1) Main memory in virtually all computers contains how many data bits at each address?

 Student Answer:   16 (two bytes, or one word, per address)

           Eight (one byte per address)

           One bit per address

           Any of the above, it depends on the CPU

           None of the above

Question 3. Question : (TCO 1) In a CPU with a 16-bit program counter, what is the maximum, directly accessible code space?

 Student Answer:    64Kbytes

           32KB

           2KB

           4KB

           None of the above

Question 4. Question : (TCO 2) Which of the following is correct for the “von Neumann” architecture?

 Student Answer:   CPU data input and output use separate data buses.

           Multiple ALUs in the same CPU, one for integer and one for floating point arithmetic.
           Multiple instructions are executed concurrently.

           Instructions and data are stored in the same memory.

Question 5. Question : (TCO 2) Operations performed by the Control Unit include

 Student Answer:   telling the ALU which operation to perform.

           routing data to/from the ALU.

           decoding instructions.

           All of the above

           None of the above

Question 6. Question : (TCO 2) What direction does data flow on a WRITE bus cycle?

 Student Answer:    From the CPU to memory or I/O port

           From memory or an I/O port into the CPU

           From the bus into the CPU

           All of the above

           None of the above

Question 7. Question : (TCO 3) For the CodeWarrior assembler,

 Student Answer:    label must start on first column; instruction and directive must not start on first column.
           label must not start on first column; instruction and directive must start on first column.
           label must start on first column; instruction and directive must start on first column.
           label must not start on first column; instruction and directive must not start on first column.

Question 8. Question : (TCO 3) The “LDAB #$AA” is _-byte instruction.

 Student Answer:   one
           two
           three
          four

Question 9. Question : (TCO 3) Which statement about CodeWarrior assembly language is true?

 Student Answer:   It is case sensitive.

           Instructions must start in Column 1.

           Labels must start in Column 1 unless followed by a colon.

           All of the above

           None of the above

Question 10. Question : (TCO 3) Which of the following is wrong?

 Student Answer:       LDX          #$5000

           LDX          #2550

           LDX          #$10000

           LDX          #$00

Grading Summary
Page: 1 2 3

Question 1. Question : (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

 Student Answer:       $04

           $09

           $07

           $1009

           None of the above

Question 2. Question : (TCO 5) The instruction “subb $100” will

 Student Answer:       subtract the content of Accumulator B from $100.

           subtract $100 from Accumulator B.

           subtract the content of memory at Address $100 from Accumulator B.
           subtract the content of Accumulator B from the content of memory at Address $100.

Question 3. Question : (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

 Student Answer:       $80

           $08

           0

           None of the above

Question 4. Question : (TCO 5) The MC9S12 instruction set has

 Student Answer:       only one multiply instruction: eight-bit signed.

           both an eight-bit signed and eight-bit unsigned multiply instruction.
           only one multiply instruction: eight-bit unsigned.

           All of the above

           None of the above

Question 5. Question : (TCO 5) In the following program, what is the largest number that Register B can take?

L1 CLRA
NOP
NOP
DECB
BNE L1

 Student Answer:       255

           100

           0x200

           0x99

Question 6. Question : (TCO 5) For a 16-bit signed number, we can use a maximum of _ bits for the magnitude of the signed number.

 Student Answer:       D7-D0

           D14-D0

           D16-D0

           D15-D9

Question 7. Question : (TCO 8) Assume that PORTB has a value of 0x37. Which of the following gives us Unpacked BCD for 7?

 Student Answer:       PORTB= PORTB & 0x37;

           PORTB= PORTB | 0x30;

           PORTB= PORTB | 0x0F;

           PORTB= PORTB & 0x0F;

Question 8. Question : (TCO 8) Fill in the blank to get 0x36 on PORTB.

Question 9. Question : (TCO 8) The following program creates square wave pulses on PB0. What is the duty cycle?

 ORG $8000   
 LDS #$4000      
 LDAA    #$FF    
 STAA    DDRB     

BACK BSET PORTB,%00000001
JSR DELAY
JSR DELAY
JSR DELAY
BCLR PORTB,%00000001
JSR DELAY
BRA BACK

 Student Answer:       33%

           66%

           75%

           25%

Question 10. Question : (TCO 8) Find the value for PORTB after the execution of the following code:

        PORTB = 0xAA ^ 0x55;

 Student Answer:       PORTB = 0x05

           PORTB = 0x0A

           PORTB = 0x0F

           PORTB = 0xFF

Question 1. Question : (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.

Question 2. Question : (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?

Question 3. Question : (TCO 7) Write a C statement to set Bit 3 of variable foo without changing other bits.

Question 4. Question : (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.

Question 5. Question : (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.

Please click on the “PURCHASE” link below to get “ECET 330 Week 7 Final Answer”.

For instant digital download of the above solution or tutorial, please click on the below link and make an instant purchase. You will be guided to the PAYPAL Standard payment page wherein you can pay and you will receive an email immediately with a download link.

In case you find any problem in getting the download link or downloading the tutorial, please send us an email on ekmtutor@gmail.com.

Leave a Comment