Programming Model 1 Tutorial Solutions.pdf - Programming...

This preview shows page 1 - 4 out of 12 pages.

Programming Model 1 A. Introduction Objectives At the end of this lab you should be able to: Use the CPU simulator to create basic CPU instructions Use the simulator to execute basic CPU instructions Use CPU instructions to move data to registers, compare values in registers, push data to the stack, pop data from the stack, jump to address locations and add values held in registers. Explain the functions of special CPU registers such as the PC, SR and SP registers. B. Processor (CPU) Simulators The computer architecture tutorials are supported by simulators, which are created to underpin theoretical concepts normally covered during the lectures. The simulators provide visual and animated representation of mechanisms involved and enable the students to observe the hidden inner workings of systems, which would be difficult or impossible to do otherwise. The added advantage of using simulators is that they allow the students to experiment and explore different technological aspects of systems without having to install and configure the real systems. C. Basic Theory The programming model of computer architecture defines those low Ͳ level architectural components, which include the following CPU instruction set CPU registers Different ways of addressing instructions and data in instructions It also defines interaction between the above components. It is this low Ͳ level programming model which makes programmed computations possible. D. Simulator Details This section includes some basic information on the simulator, which should enable the students to use the simulator. The tutor(s) will be available to help anyone experiencing difficulty in using the simulator. The simulator for this lab is an application running on a PC running MS Windows operating system. The main window is composed of several views, which represent different functional parts of the simulated processor. These are shown in Image 1 below and are composed of 1
Image of page 1

Subscribe to view the full document.

CPU Instruction memory Special CPU registers CPU (general purpose) registers Program stack Program creation and running features CPU registers view CPU Instruction memory view Special CPU registers view Add program instructions tab Program stack view Program list view Create program tab Image 1 – CPU Simulator window The parts of the simulator relevant to this lab are described below. Please read this information carefully and try to identify the different parts on the CPU Simulator window BEFORE attempting the following exercises. Use this information in conjunction with the exercises that follow. 2
Image of page 2
1. CPU instruction memory view Image2 Ͳ Instruction memory view This view contains the program instructions. The instructions are displayed as sequences of low Ͳ level instruction mnemonics (assembler Ͳ level format) and not as binary code.
Image of page 3

Subscribe to view the full document.

Image of page 4
  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes