Write a program to find the sum of the elements of an array

Assignment Help Other Engineering
Reference no: EM13805288

Write a program to find the sum of the elements of an array called list1. The size of list1 is four bytes. The values of list1 are $FF, $1, $FE, and $02. To check your work, the sum should become $0200.

The requirements for writing this program are as follows.

- You must use a loop and count variable (i.e. count must be defined in the data section) as a loop counter.

- Clear both Registers A and B using CLRA and CLRB instructions.

- Use indexed addressing mode to access the elements of the array using Register X as the index register. The instruction LDX #list1 places the array list1 address into Register X.

- Add each element to Register B.

- Use the branch instruction BCC to check if there is a carry after the addition of each element. BCC means the Branch if Carry flag is clear.

- If there is a carry, add 1 to Register A.

- The final result should be in Register A and B.

Reference no: EM13805288

Questions Cloud

Write an assembly language program to load register : Write an assembly language program to load Register A with number 7, and Register B with number 8. Add these two registers
Create a graphic organizer that includes organization : Create a graphic organizer that includes a definition for the Organization, as well as an activity that supports learning.
Use a subroutine to find the sum of the array elements : Write a program to use a subroutine to find the sum of the array elements. For simplicity, assume that the sum of the data values is less than $FF
Explain the organization''s motives : Create a word document or powerpoint presentation detailing the events you selected. Include the following in your document or powerpoint presentation
Write a program to find the sum of the elements of an array : Write a program to find the sum of the elements of an array called list1. The size of list1 is four bytes. The values of list1 are $FF, $1, $FE, and $02. To check your work, the sum should become $0200
Create a graphic organizer that includes ideas and content : Create a graphic organizer that includes a definition for the Ideas and Content, as well as an activity that supports learning.
Exchange rate between the mexico pesoand australian dollar : Which economist believes that there is a continuing trend in the development of the exchange rate and which economist believes that there is a reversal in the development of the exchange rate?
Write a program to turn led4 and led1 on : Write a program to turn LED4 and LED1 ON. LED2 and LED3 must be OFF. Single step the code. After executing the line that sends the pattern to PTT, cut and paste the Memory Window showing the value of PTT
Describe a minimum of five crisis management situations : Prepare a paper in which you describe a minimum of five crisis management situations associated with physical or personal protection issues.

Reviews

Write a Review

Other Engineering Questions & Answers

  Identify and explain the possible limitations

Identify and explain the possible limitations on the product imposed by the processing and by the need to safeguard the environment and minimise costs

  Question 1a pool of newly qualified doctors are not

question 1a pool of newly qualified doctors are not satisfied with their existing revenue and decide to set up an

  Electrode impedances

How did this procedure affect the signal observed from the electrode and the electrode impedances?

  What would the partial pressure

CEE 357 Win 2014 HW#4, What is the concentration of HCN(aq) in the solution? What would the partial pressure of HCN(g) be in the gas phase, if the gas equilibrated with the solution?

  Heat and humidity in an underground mining situation

List the main sources of heat and humidity in mines and briefly describe the methods that can be used to control heat and humidity in an underground mining situation.

  Analyze a drier that reduces the moisture content

Analyze a drier that reduces the moisture content of bentonite from 11% (bone dry basis) to 4% bdb. Assume the plant processes 100 tons/day is a gas fired rotary kiln

  Problems based on applying nodal and mesh analysis

Discuss how the determination of the Thevenin Equivalent circuit simplifies the complex circuits.

  Financial statement and balance sheets for past five years

The financial statement and balance sheets for the past five years. There are also assumptions that can be used for the calculation of the items above

  Formulate a linear programming model

Determine how to load each truck by deciding on how many units of the product will be delivered to each by each truck. While doing so, you need to make sure that each store is delivered with exactly the number of units of the product they require.

  1 demonstrate knowledge and understanding of the key

1. demonstrate knowledge and understanding of the key engineering principles that underpin current geotechnical and

  Describe the method of undertaking an anemometer traverse

Calculate the volumetric flow rate and the mass flow rate assuming that the air has a density of 1.2 kg/m3 and describe the method of undertaking an anemometer traverse for a mine airway

  Problems related to unctioning reinforced concrete pipe rcp

Calculate the Stations & Elevations for all of the U/S reaches including the transitions.

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