Write a program sequence that places the value in address

Assignment Help Programming Languages
Reference no: EM13774919

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.

Verified Expert

This paper answers the multiple choice question of the low level programming like C, HSC12 controller and assembly programming. It also contains the program in the assembly language that make use of the conditional statement and the array and also the basic information about the control flow and logic about the program.

Reference no: EM13774919

Questions Cloud

Explains the legal criteria for civil commitment : Create a 10- to 15-slide multimedia presentation that explains the legal criteria for civil commitment, competency to stand trial, and Not Guild by Reason of Insanity (NGRI)
How does medical parole or release fit into this discussion : Which of these arguments do they think have merit? What values underlie each position? How does medical parole or release fit into this discussion? Provide alternative solutions to the problem and discuss their overall impacts
Write an essay about animal farm : Write an essay about animal farm. composing one of the messages that the pigeons carry to other farms to tell of the Rebellion.
Determine how environmental and innate factors lead : Determine how environmental and innate factors lead to delinquencies. examine the types and examples of juvenile delinquency or crime
Write a program sequence that places the value in address : 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.
Write four paragraphs about the movie gladiator : Write four paragraphs about the movie gladiator.
What are the main arguments : An annotated bibliography examines scholarly articles and books on a certain issue and provides a summary of each. The purpose is to offer an overview of the literature on a topic
What facts may weigh in favor of or against chou : What facts may weigh in favor of or against Chou in terms of the parties' objective intent to contract
Explain the multilingual situation in the us : Define "language diversity" and explain the multilingual situation in the US. State your perspectives/argument. Relate how language one speaks may shape his/her identities in public or private.

Reviews

inf774919

8/29/2016 3:08:20 AM

I appreciate for quick delivery of task in this price. You really charged very less from others. I checked the same assignment on 7 more other services but they were asking for high price due to less time, but you did not do so. Thanks for having such a great service, will update you with my new assignments soon.

Write a Review

Programming Languages Questions & Answers

  Imagine you are a marketing consultant brought in to help a

imagine you are a marketing consultant brought in to help a company who has a product that is so successful they cannot

  Website design html

It's all about Website design. It is going to be web site. 3 web pages, 2 font styles, 2 font sizes, 2 colors minimum.

  Program to use next character to create and return operator

Convert the string of digits into an integer. Otherwise, use the next character to create and return an operator.

  Write program to test every entry of table is saddle point

Saddle point is entry in a table which is a minimum for its row and maximum for its column. Write a program which will test every entry of table to see whether it is saddle point.

  Write script which declares and sets variable

Write the script which declares and sets a variable that's equal to total outstanding balance due. If that balance is greater than $10,000.00, the script must return the result set consisting of VendorName,

  Write script to get gross sales for each employee by xhtml

Use a one-dimensional array to solve the folloing problem: Write a script (using an array of counters) that obtains the gross sales for each employee through an XHTML form and determines how many of the salespeople earned salaries

  Based on the keston 2013 article in the electronic reserve

write a 200- to 300-word short-answer response to the followingbased on the keston 2013 article in the electronic

  Create a multi-threaded competition

Create a multi-threaded competition in which opposing Robin Hoods will attack one another and try to take each other's gold coins.

  Different types of program documentation

List at least three different types of program documentation and the pros and cons of each. When should you use each and can you use only one of them?

  Implement shape hierarchy-compute area of two-dimensional

Implement Shape hierarchy. Each TwoDimensionalShape must contain function getArea to compute the area of two-dimensional shape. Each ThreeDimensionalShape must have member functions.

  Binary search algorithm to search an array

The binary search algorithm that follows may be used to search array when elements are in order. This algorithm is analogous to following approach for finding name in telephone book.

  Use of various bash commands

Assignment On: This work will require scripting the use of various bash commands and / or small programs that involve directory and file structures.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd