Write compact code to avoid running out of memory

Assignment Help Computer Engineering
Reference no: EM131483472

Run the program. Wait for the lift window to appear then click the UP button in the lift window. The lift UP motor is then turned on and the lift will rise until it crashes into the top of the shaft, even if you stop your program. Click the "Repair Crashed Lift" button to restore the lift window.

Note the use of AND to clear a single bit without affecting other bits and OR to set a bit without affecting other bits.

Read the full capabilities of the lift in the Tutorial section on Peripheral Devices.

Each step below adds functionality to the lift. Complete as many steps as you can, saving your program in a different file at each step (take care not to overwrite previous steps). Don't miss out steps and try write the final program in one go or you will have nothing to submit if you fail.

You will need to write compact code to avoid running out of memory. You must not store code in locations reserved for the memory mapped display, [C0] to [FF]. If you use procedures or interrupt routines, you must not store code in locations used by the call stack, [BF] downwards, or your code will be overwritten at run time.

You may use any of the techniques you learned in the tutorials.

Discuss ideas and techniques with colleagues but do not copy code from each other or from the Internet. We will check for plagiarism.

Marks will be awarded for each step successfully completed and for correct functionality. Programs which do not assemble will receive a zero mark. Programs which do not function will receive a zero mark.

Coursework

Modify your program to:

1. Detect when the lift nears the top of the shaft then turn off the motor before it crashes.
(If you have to make your simulation run Faster to avoid crashing before the limit can be detected, you should consider restructuring your code)

2. Detect a click of the DOWN button then turn on the DOWN motor.
(You may allow the lift to crash into the bottom of the shaft)

3. Detect when the lift nears the bottom of the shaft then turn off the motor before it crashes.
(It should now be impossible to crash the lift no matter when or how many times the UP or DOWN buttons are clicked)

4. Display the lift status on the memory mapped display starting at [C0] without crashing the lift.
(Lift status must be exactly: BOTTOM or UP or TOP or DOWN)

5. Cause the lift to return to the bottom of the shaft immediately if the Enter key (En) is pressed on the numeric keypad peripheral device.
(After returning to the bottom of the shaft, the lift must operate normally)

Reference no: EM131483472

Questions Cloud

Political changes and banking reforms : People will have to work longer, spend less, and forego essentials. This could also lead to political changes and banking reforms.
Describe the three categories of information : Characteristics of the area of a proposed highway location that can be assembled in the office prior to any field survey activity.
Consumers prefer the taste of their diet product : A soft-drink company has determined in taste tests that consumers prefer the taste of their diet product when sweetened with Splenda in comparison to Equal.
Chinese company huawei should step into american market : Write a article to improve your strategy by using some tools such as SWOP analysis and Porter's Five forces.
Write compact code to avoid running out of memory : Cause the lift to return to the bottom of the shaft immediately if the Enter key (En) is pressed on the numeric keypad peripheral device.
Modern translation comparison : Select three modern translations of the Bible to compare with one another: (See "Finding Your Translations" below.)
What is one benefit to business government budget in surplus : Since 1950 the federal government has run a surplus on average roughly 1 year in each decade. Why is it so difficult for the federal government to run a budget.
Review the strategic objectives : In Session 1, you were asked to read CCU's Strategic Objectives. Review the strategic objectives again in light of what we have talked about.
What determines the inflationary impact of budget deficits : What determines the inflationary impact of budget deficits?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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