Write a program sequence that places the value in address


Question 1. Dynamic memory requires _____ that is not needed for other types of memory.

refresh

data bus buffer

address decoder

dual power supply

Question 2. What is the maximum size of main memory for a processor with a 23-bit address bus?

Eight Mbyte

23 Mbytes

Three Mbytes

8,000,000 bytes

None of the above

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

64Kbytes

32KB

2KB

4KB

None of the above

Question 4. The circuit that performs the instruction "ADDA" in the HCS12 CPU is

MMU.

ALU.

cache.

accumulator.

Question 5. Operations performed by the ALU include

decoding instructions.

coordinating data transfer to and from the ALU.

addition and subtraction.

All of the above

None of the above

Question 6. What direction does data flow on a READ bus cycle?

From the CPU to memory or I/O port

From memory or an I/O port into the CPU

From the bus into a memory location

All of the above

None of the above

Question 7. Which of the following is an assembly directive?

"loop:"

"ds.b 1"

"adda"

"bitb"

Question 8. The HCS12 uses _____.

Little Endian

Big Endian

Both A and B

None

Question 9. Which statement about CodeWarrior assembly language is true?

It is case sensitive.

Instructions must start in column other than 1.

Labels never start at Column 1.

All of the above

None of the above

Question 10. Which of the following is wrong?

LDY #$55

LDY #$255

LDY #$20000

LDY #5000

Question 11. 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
$04

$09

$07

$1009

None of the above

Question 12.The instruction "subb $100" will

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 13. What will be the value in Accumulator A after the following program is executed?

ORG $2000

DATA1 DC.B $55

ORG $8000

LDAA DATA1

LDAB #8

BACK LSLA

DECB

BNE BACK

HERE BRA HERE
63

55

0

1

Question 14. Which flag is used to see if the signed data are correctly added together?

V

C

Z

H

Question 15. In the following program, what is the largest number that Register B can take?

L1 CLRA

NOP

NOP

DECB

BNE L1
255

100

0x200

0x99

Question 16. What C-language construct does the following assembly code implement?

LDAB #10

L1: ADDA 0, x

INX

DECB

BNE L1

Loop

If

If /else

All of the above

None of the above

Question 17. Assume that PORTB has a value of 0x37. Which of the following gives us Unpacked BCD for 7?

PORTB= PORTB & 0x37;

PORTB= PORTB | 0x30;

PORTB= PORTB | 0x0F;

PORTB= PORTB & 0x0F;

Question 18. Fill in the blank to get 0x36 on PORTB.

unsigned char BCD_Byte = 0x67;

unsigned char x;

x= BCD_Byte & 0xF0;

_____;

PORTB = x | 0x30;

x=x>>4;

x=x>>2;

x=x<<4;

x=x<<2;

Question 19. 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

BCLR

PORTB,%00000001

JSR

DELAY

JSR

DELAY

BRA

BACK

75%

66%

33%

25%

Question 20. Find the value for PORTB after the execution of the following code:

PORTB = 0x66 ^ 0xFF;

PORTB = 0x66

PORTB = 0x99

PORTB = 0x0F

PORTB = 0x33

Question 21. Write a program sequence that places the value in Address $1000 into Accumulator A and places the value in Address $1001 in Accumulator B. Then, add these values together and store the result in Location $1002.

Question 22. 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 23. Write a C statement to set Bit 3 of variable foo without changing other bits.

Question 24. 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 25. 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.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a program sequence that places the value in address
Reference No:- TGS01044981

Expected delivery within 24 Hours