Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Other Engineering Expert

Examining the CY flag and the stack

OBJECTIVES:

- To examine the flag bits of the PSW.
- To examine the stack.

ACTIVITY 1
Write and assemble a program to add the following data and then use the simulator to examine the CY flag.

92H, 23H, 66H, 87H, F5H

ACTIVITY 2
Write and assemble a program to load values into each of registers R0 - R4 and then push each of these registers onto the stack. Single-step the program, and examine the stack and the SP register after the execution of each instruction.

 

ACTIVITY 3

Write and assemble a program to:
(a) Set SP = 0D,
(b) Put a different value in each of RAM locations 0D, 0C, 0B, 0A, 09, and 08,
(c) POP each stack location into registers R0 - R4.

Use the simulator to single-step and examine the registers, the stack, and the stack pointer.

1. Find the value of the CY flag after the execution of the following code.

            (a)        MOV   A,#85H 

                        ADD   A,#92H

            (b)        MOV   A,#15H 

                        ADD   A,#72H

            (c)        MOV   A,#0F5H

                        ADD   A,#52H 

            (d)       MOV A,#0FF

                       INC A

2. Upon reset, what is the value in the SP register?

3. Upon pushing data onto the stack, the SP register is _____________ (decremented, incremented).

4. Upon popping data from the stack, the SP register is ___________ (decremented, incremented).

5. Can you change the value of the SP register? If yes, explain why you would want. A SP is a small register that stores the addresses of the program request in a stack, which stores data from the top down. The most recently request always takes from the top.

6. The stack uses the same area of RAM as bank __4____.

Other Engineering, Engineering

  • Category:- Other Engineering
  • Reference No.:- M92492643

Have any Question?


Related Questions in Other Engineering

Mine safety amp environmental engineeringpart 1 questions1

Mine Safety & Environmental Engineering Part 1. Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the following terms ...

1 online discussion forum - post your proposed topic and

1. Online Discussion forum - Post your proposed topic and chosen data set as well as a short plan for the project. This is required for approval of the topic. As discussed, students must select unique topics, therefore i ...

Assignment -problem 1 - given is the lcc difference

Assignment - Problem 1 - Given is the LCC difference equation that represents some LTI system: y(n) - ¾y(n-1) - ¼y(n-2) = x(n) + x(n-1)   a) Find the impulse response of the system (solve the LCCDE). b) Draw a block diag ...

Select a risk problem from the list below and prepare a

Select a risk problem from the list below and prepare a risk management plan in accordance with AS/NZS ISO 31000:2009. Please ensure that: - Establish the context clearly, in accordance with the Standard; - Define your s ...

Homework - risk and decision management1 you are working

Homework - Risk and Decision Management 1) You are working program X. The total budget allocated to the program is $100 M and it is to be completed in 24 mo. range (R) and passenger capacity (C) are two key performance p ...

Conceptual design of forced-free-mixed convection

Conceptual Design of Forced-Free-Mixed Convection Experiment This assessment is to be completed individually. 1. Learning Outcomes: - Develop a basic ability to conceptually design an experimental apparatus - Use theory ...

Projection of planes1 a regular pentagon of 25 mm side has

Projection of Planes 1. A regular pentagon of 25 mm side has one side on the ground. Its plane is inclined at 45° to H.P. and perpendicular to the V.P. Draw its projections. 2. Draw the projection of a circle of 50 mm di ...

A detailed review of spatial modulation and simulation

A Detailed Review of Spatial Modulation and Simulation Learning Outcomes a. Learn how to model mobile communication channels d. Discern knowledge development and directions on the recent advances in 4G to the research pr ...

Register design a cpu register is simply a row of

Register design A CPU register is simply a row of flip-flops (i.e. SR, JK, T, etc) put side by side in an array to make the size of register required. For example, an 8 bit register has 8 flip-flops side by side for stor ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As