Program to send the listed data stored at memory locations

Assignment Help Electrical Engineering
Reference no: EM13720027

Lab Objective

- Using the stack to store data
- Writing programs using subroutines
- Parameter passing using the stack

Procedure:

Part I: Using the stack to store data

Complete the following program to store the listed data into the RAM locations starting at $3000 using the stack pointer and the PUSH command. Use memory dump (md) command to see the data stored at the memory locations and include in your lab report.

Data: $55AA, $6811, $6CA0, $1ABC, $5AB3

ORG   

$2000

LDS 

#$3000

LDX

#$55AA

PSHX  

 

LDX 

 

.

 

.

 

PULX

 

SWI

 

  1. Add comments for each assembly line in your report. Include a screen shot of data stored. You can use md 2FF0 to see data stored in memory. Why?
  2. Why index register X has been used to load data and not ACCA?
  3. Does the high byte store first or the low byte?
  4. What data index register X will contain at the end of the program?

Part II: Subroutines

Write a program that finds the square of a number listed below in a subroutine and stores the results into the memory locations $2100-$2104. Complete the following program and use memory dump (md) to see the result obtained. Do not forget to add comments to the each program line and explain its operation.

Hint: Multiplying a number by itself will make it square. You can also get some idea from the program on page 117 of the textbook.

Numbers: $0A, $0C, $0B, $0F

ORG   

$2000

LDS 

#$3000

LDX

#$55AA

PSHX  

 

LDX 

 

.

 

.

 

PULX

 

SWI

 

 

SQUARE:

.

TAB

MUL

.

RTS

Part III: Parameter passing using the stack

Write a program to send the following listed data stored at memory locations $2100-$210F to a subroutine that adds them up. Store the result at memory location $21FF. Use "md" to see the result and include in your report.

Data (numbers are in decimal): 10,15,34,4,5,6,9,23,38,2,11,14,15,9,7

Do not forget to include a screen shot of the program with zero compilation error and load to the board successfully.

Reference no: EM13720027

Questions Cloud

Assignment-goal write-up : A number of years have passed since the writing of The Goal. Since then, developments in both technology and operations management theory have changed the toolset that is available to a plant manager like Alex Rogo (e.g.; lean, six sigma, the inte..
What is the net saving or loss and the benefits : Calculate saving for all categories in yr 2,3,and 4 taking yrs 1 as a based also total incremental saving from higher employee retention for all personnel categories - what is the net saving or loss and the benefits/cost ratio
Case study- phionia''s finicky feline gourmet cat dinners : Mini-case study- Phionia's finicky feline gourmet cat dinners, Sales budget in dollars, Production budget in units
Gender inequality in the workplace-sexual harassment : Use and add the real life situation provided below to write this paper. Provide examples to explain the behaviors, and use researched material to support your reasoning.
Program to send the listed data stored at memory locations : Write a program to send the listed data stored at memory locations $2100-$210F to a subroutine that adds them up. Store the result at memory location
Assume the van der Waals equation of state holds : Assume the van der Waals equation of state holds for the n-propane molecule (C3H8). Find values for the constants a and b (online) and use these to calculate the density in (g ml^-1) at a temperature of 1000K and a pressure of 10 atm. The equation or..
Strategy for kodak-the rise and fall of eastman kodak : Review Case study "The rise and fall of Eastman Kodak: Will it survive beyond 2012?" located in the textbook. Assume that you have been hired by Kodak as a business consultant to recommend a new corporate-level strategy for the company to improve ..
Particular method to handle stress : Discuss on what basis should the organization choose a particular method to handle stress?
Implement a state-space search : You will implement a state-space search that will find a solution to the sixteenpuzzle. For this program, in addition to the state-space search control, you will need to implement at least two other classes

Reviews

Write a Review

Electrical Engineering Questions & Answers

  What is the average power in watts needed of a machine

What is the average power in Watts needed of a machine that cools 10 lb/minute of dry air from 20 to 15 degrees Celsius

  Determine what will be the output at the maximum load

If it is instrumented with four active strain gages on awheatstone bridge, two axial and two transverse as shown, with S,i.e. strain gage factor of 2.1, initial resistance of strain gagesR = 350 Ω, and the power supply is 10V, what will be theoutp..

  Determine a time-domain sequence of dft

Let x[k] be a time-domain sequence and X[r] be its DFT. (When written as vectors, unless stated otherwise, always assume the first entry in the vector is at k=0 or r=0, respectively.) If x[k] = [5, 9, 6, 10]

  What is the maximum value of voltage that is considered

What is the maximum value of voltage that is considered a valid logic 0 at bit D0 of the 8088's data bus Assume that the output is sinking 2mA

  Design to give an output that is one third of supply voltage

Design it to give an output that is 1/3 of the supply voltage. Furthermore, neither the power ratings of the resistors nor the current rating of the supply are to be exceeded. The voltage output of the divider must not change by more than 1% when ..

  How much can be saved each year if the motor was wired

The resistance is .4 ohm for each transmission wire connecting the motor source. If the motor was operating at 100% pf and eff and the cost of electrical power was $.10/kWh, how much can be saved each year if the motor was wired to the 240.

  Calculate the minimum required widths of the transistors wn

A CMOS output driver circuit on an IC is connected to an external transmission line. The NMOS and PMOS transistors have gate oxide thickness d = 2.0 nm and channel length L = 0.25 mum. The power rail is VDO = 1.0 V.

  Determine the magnitude of the resultant

A tow truck applies forces F1 and F2 to the bumper of an automobile where F1 is horizontal. Determine the magnitude of F2 that will provide a vertical resultant force, and determine the magnitude of this resultant.

  Find the transfer function and resolution

find the transfer function and resolution for a 10-turn, 4.7k potentiometer with 3450 degrees of rotation and a 0 to 5 volt output. calculate the resolution in ohms per volt

  Predict resulting current waveform for the voltage across

If the voltage across a capacitor is a square wave, predict the resulting current waveform (draw the voltage and current waveforms). Repeat the process when the voltage across the capacitor is a sine wave.

  Draw the circuit and discuss the operation of sa type adc

Draw the circuit and discuss the operation of SA type ADC. Determine the conversion time of an SA-ADC for 12-bit resolution,at 2.5 MHz.

  Determine refractive index of the active ingaas layer

Graded-index separate confinement double heterostructure (GRIN-SCH) InGaAs/GaAs lasers with various cavity lengths were tested in the lab. The 100m wide oxide strip lasers consists of two pairs of 10nm In0.2Ga0.8As quantum-well (QW).

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