CMPE 401 - Computer Interfacing

Assignment #1

Due: In the CMPE 401 assignment box at 15:45 on Friday, Oct. 13, 2006


  1. A task is an executing program, together with its context, that can can be stopped at one time, and then restarted later on. (It is possible for several different tasks to be executing multiple instances of the same program. Each such task would be distinguishable by its unique context.) Briefly describe the mechanisms that are required to allow tasks to be stopped at one time and then restarted later on by a multitasking kernel, regardless of the presence of other executing tasks.

  2. Briefly describe the difference between soft and hard real-time constraints in the context of operating systems or kernels. Characterize each of the following control problems as either soft or hard real-time: (a) control of a robot manipulator arm on a car assembly line; (b) an electronic poker game; (c) a building door-lock control system; (d) a train engine control system; and (e) a video lottery terminal. Briefly justify your classification in each case.

  3. The 68000 family of microprocessors has a rich set of addressing modes and a relatively large instruction set. For this reason the 68000 microprocessors are called complex instruction set computers (CISCs). A contrasting style of computer architecture is the reduced instruction set computer, in which the number of addressing modes and instructions is much smaller than in a CISC. The 68000 was designed at a time (in the late 1970s) when most microprocessors were programmed primarily in assembly language. Why then would a CISC architecture be viewed as being more attractive at that time compared to a RISC architecture? At the present time, when most microprocessors are programmed using compiled programs, why would the RISC architecture be viewed as being more attractive compared to a CISC architecture? Why are most modern processor architectures today a compromise between the CISC and RISC styles?

  4. Briefly explain how the architecture and implementation of MicroC/OS-II makes it easier to port across a variety of different computers. Focus your comments on the main features that enhance portability.

  5. Consult the on-line documentation for the CPU32 (follow the links on the course homepage) and then, in your own words, briefly explain how the TBLU and TBLS instructions work. Give a simple example of how each instruction could be used.

  6. The original 68000 microprocessor supported only 8-bit and 16-bit displacements in the branch instructions. (32-bit displacements had to be performed using jump instructions instead.) The CPU32, however, supports 8-bit, 16-bit and 32-bit displacements. Briefly explain what changes were required in the instruction formats to support the larger, 32-bit displacements.

  7. Design a subroutine in 68000 assembly language, to be called READ_DATA, that retrieves the three data fields in a packed list of 11-bit-long records. Each record contains (going from the most significant bit to the least significant bit position) one 4-bit field, one 5-bit field, and one 2-bit field. The records are packed together, without leaving any unused bits, starting at a particular base address in memory. The records are numbered in increasing order, starting with zero. The packed list has a limited size, so there is a maximum allowed record number.

    Your subrountine is to accept two input parameters: the base address of the list in A0.L and the record number in D0.W. The three record fields are to be returned in D1.B, D2.B and D3.B. Register D7.B is to be zero if the record was access successfully; otherwise, it is to contain the value one. Your routine is to calculate byte addresses, instead of doing a linear search through the packed list.