Assignments
on Computer Organization
and Architecture

CS-350: Computer Organization

© 2000 Charles Abzug

 

Textbook for these Assignments:

Maxfield, Clive Richard; & Brown, Alvin (1997). Bebop Bytes Back: An Unconventional Guide to Computers. Madison, AL: Doone Publications. 97-65591; ISBN 0-9651934-0-3.

NOTE that Maxfield and Bloom have a very well-developed sense of humor, which becomes apparent very early on in their book, Bebop Bytes Back. In fact, it is apparent even from the title. Be forewarned, however, that according to your taste, some readers may find the humor in this book to be a little overdone and forced. Maxfield's earlier book, Bebop to the Boolean Boogie, is noticeably lighter-handed in its treatment of humor, does not evoke the same kind of feeling.

 

 

Computer Org. & Arch. Assignment 1:

Readings: Bebop Bytes Back:

  1. Chapter 0: What is a Beboputer? (pages 0-1 through 0-8)
  2. Chapter 1: What is a Computer? (pages 1-1 through 1-11)
  3. Chapter 6: Primitive Logic Gates (pages 6-1 through 6-13)
  4. Chapter 2: Roaming Around a Computer (pages 2-1 through 2-37)
  5. NOTE that in Figure 2.23 on page 2-33, the text in the lower right corner of the figure should read, "Locations $F040 to $FFFF are unused."

  6. Appendix A: Installing Your Beboputer (pages A-1 through A-5)

Points to Ponder as you do your reading:

    1. In Chapter 6 of Bebop Bytes Back, various logic gates are described, each of which has either one input (NOT, Buffer gates) or two (AND, OR, NAND, NOR, XOR, XNOR gates). For each of the six kinds of two-input gates, how would you develop and extend the Truth Table if the number of inputs to each gate were extended from two to three, four, five, etc.? Note that this is a very straightforward issue for some logic gates, but a difficult one for others.
    2. What is the precise relationship between the number of address lines that are available to specify a memory address and the number of memory locations in the computer? This question is rather more complicated than it might at first appear: does every possible address have to reflect a physical memory location? Take a careful look at the memory map in Figure 2.23 of Bebop Bytes Back. Also, consider the reverse issue: If the number of memory locations is specified, how do you calculate the number of address lines needed?

Review & Study: Quick Quiz # 1 (end of Chapter 1), Quick Quiz # 6 (end of Chapter 6), and Quick Quiz # 2 (end of Chapter 2). Also, Review Questions on Digital Number Representation and Review Questions on the Basic Principles of Design and Construction of Digital Computers.

Learning by Doing:

  1. Install the "Beboputer" simulator on your home computer. The ordered list of steps necessary to accomplish this is given in Bebop Bytes Back, Appendix A. Note that the "Beboputer" simulator has been certified, and is guaranteed when installed according to directions, to run under "Windows 95". It is neither certified nor guaranteed under "Windows NT". You can install it, however, under "Windows NT", and if you do it will run for the most part properly. Under certain circumstances an error message will appear on the screen, requesting that you click "OK" to terminate the application. When this happens, resist the temptation to do what the presumably omniscient computer wants you to do. Instead, move the pop-up window containing the error message to the extreme lower edge of the screen, and ignore it. The simulator will work just fine despite what the error message proclaims.

Deliverable: You will be assigned to a group to do the following assignment: The Read-Only Memory (ROM) of the Beboputer contains several programs that fit into the general category of an Operating System, utilities, and a collection of subroutines. An operating system consists of a collection of programs that assist you in managing your computer and its associated resources. Utilities are programs that provide generally useful functions that you can call upon as the occasion demands. For example, the "Monitor" program, described on pages 3-29 and 3-30 of Bebop Bytes Back, constitutes a primitive operating system. You might expect from a cursory reading of the text that this program occupies the region of ROM from location $0000 through $001C.

  1. Power up your Beboputer simulator, activate its "memory walker", and examine the contents of the portion of the memory map presumably occupied by the Monitor. Do you see anything in the memory contents when you set the Memory Walker to the start address for the Monitor Program? If not, why not? Start with the contents of memory location $0000, read the presumptive op code stored there, and look it up in Figure C.2, which appears in Appendix C on page C-14. You may have to search several of the columns marked "op" in the figure until you find it. Look next at the entry in the column to the immediate right of the "op" entry in the table to find out how many bytes are occupied in total by the instruction op code and any operand information that may be required. Read off from the super-column header the addressing mode pertaining to the particular instruction's op code, and read from the row header the instruction mnemonic. On pages C-3 through C-13 you can find an explanation of the relevant addressing mode, and on pages C-16 through C-58 you can find out both what the instruction mnemonic means and also what the instruction does. If the instruction is other than an implied-mode instruction, then you will also have to understand the following one or two bytes as either the value of an operand or the address of a memory location. Once you have come to a complete understanding of what the first instruction accomplishes, make a note of the contents of the one or two or three memory locations that pertain to this instruction, and explain what it all means.
  2. Proceed onwards to do the same for the next instruction in the Monitor program, and continue in this manner until you can no longer continue any further. What do you think is the problem? What is actually stored in these memory locations instead of the actual Monitor program?
  3. There are two other programs supposedly located in the Beboputer's ROM, one that starts at address $0030 and runs until $0042, and another that starts at $0050 and continues until $0066. Analyze both of these memory regions, too, and include them in your report.

 

 

Computer Org. & Arch. Assignment 2:

Readings: Bebop Bytes Back:

  1. Chapter 3: The Switch and Display Panels (pages 3-1 through 3-32) Note that four lines from the bottom of page 3-9, the word should be "omniscient" rather than "omnipotent".
  2. Chapter 12: Assembly Language and Stuff (pages 12-1 through 12-33)

NOTE that the section in Chapter 12 that covers Addressing Modes beginning on page 12-29 gives a complete list of the Beboputer instructions that are capable of utilizing each addressing mode discussed. Because the assigned readings have skipped over several chapters, some of the instructions listed in this part of Chapter 12 have not yet been discussed in detail in the assigned readings. Do not worry about any unfamiliar instructions that you may encounter at this time. They will eventually be covered.

NOTE also that you do NOT need to memorize the list of instructions that are capable of utilizing each of the Beboputer addressing modes.

Points to Ponder as you do your reading:

  1. In Chapter 3 of Bebop Bytes Back, the instruction length for a single "Beboputer" instruction is described as being one, two, or three bytes. We shall come back to the issue of total instruction length a little later in the course, when we take up the issue of addressing modes. But for now, focus in on the issue of opcode length. The opcode for the "Beboputer" is always one byte. How many different opcodes can be represented in one byte? For the "Beboputer", one byte is more than ample, because it has a simple instruction set and just a few addressing modes (don't worry; we haven't yet gotten to the details of addressing modes, but we will). There are, however, machines that have over 300 different instructions, which is well beyond the number that can be represented in just one byte. If you were a computer designer, how would you handle that little problem? Think hard about the answer: does it have to be "one size fits all"?

Review & Study: Quick Quiz # 3 (end of Chapter 3) and Quick Quiz # 12 (end of Chapter 12). Also, Review Questions on the Basic Principles of Design and Construction of Digital Computers.

Learning by Doing:

  1. Follow the directions given in the section, "The Beboputer's Calculator Utility". starting on page 2-16 of Bebop Bytes Back. Convert several integers manually from decimal to hex and from hex to decimal, and from decimal to binary and from binary to decimal (suggestion: use the integer parts of the numbers in your problem set). Convert your hex numbers to binary and your binary numbers to hex. Then, perform the same conversions using the utility provided and compare your results before looking at the worked problems at the end of the problem set.
  2. Power-up your Beboputer simulator and follow all the directions for Lab 1 on pages 3-10 through 3-31.
  3. Power-up your Beboputer simulator and follow all the directions for Lab 2 on pages 4-6 through 4-15.

Deliverable:

You will be assigned to a group to perform the following assignment: Write a Beboputer Assembly Language program to carry out the functions implied by the C language statement listed below. In accomplishing this, you must:

    1. define memory locations to hold both the input values that the program needs to execute and the output values;
    2. code the entire program yourself, i.e., do NOT make use of the subroutines packaged with the Beboputer simulator.
    3. You are not required to perform any output operations, such as outputting the result of the arithmetic operation to the LED display.

C = A + B;

NOTE (1) that your program needs both an .END directive and at least one HALT instruction. Take a look at the beginning of Chapter 12, if necessary, in order to understand the assembler requirements.

NOTE (2) that this assignment is intended to be fairly simple. In fact, the program that you have been assigned to write can be accomplished in fewer than ten lines of code, including CPU instructions and Assembler directives, exclusive of comment lines. You are not required to keep your programs that short, but if yours is substantially longer, then there is probably an underlying misunderstanding somewhere.

 

 

Computer Org. & Arch. Assignment 3:

Readings: Bebop Bytes Back:

  1. Chapter 7: Binary Arithmetic (pages 7-1 through 7-17)
  2. Chapter 8: Rampaging Around a CPU (pages 8-1 through 8-16). Note that the text in the center of page 8-9 should read "Bearing . . .". and the bolded text on page 8-10 should read, ". . . counting from the right.")
  3. NOTE that the material in Chapter 8 is considerably more difficult than that of the previous chapters. Therefore, the readings from Chapter 8 are divided into several subunits. It is recommended that you do one subunit and then take a short break before tackling the next one. Any subunit boundary can also provide a logical point to break for the evening, if you are so inclined.

  4. Chapter 12: Assembly Language and Stuff (pages 12-55, bottom, through 12-60, center)

Points to Ponder as you do your reading:

  1. Figures 7.7 and 7.8 of Bebop Bytes Back illustrate the logical circuit for a single-bit full adder and the interconnection of several such single-bit full adder circuits to form a single combinational circuit to add two multi-bit numbers. When we perform arithmetic operations in a digital computer, we must also generate "status bits" which provide the computer with summary information regarding the arithmetic operation most recently completed. There are typically four such status bits for integer operations: the Z (Zero) bit, which has a value of '1' when the result of the operation has a value of zero, and a '0' otherwise; the N (Negative) bit, which has a value of '1' to indicate when the result is negative, and '0' otherwise; the V (oVerflow) bit (typical notation in American computer literature; referred to by Maxfield as the O bit), indicating an overflow (the correct result of the operation cannot fit into the number of bits available in the results register); and the C (Carry) bit, indicating a carry out from the operation. How would you connect together the various types of logic gates of the kinds discussed in Chapter 6 to determine the values of the four status bits for Unsigned-Number addition? for Ones'-Complement addition? for Two's-Complement addition? What about Saturation Arithmetic? Note that in some cases you might have to use multiple-input versions of some logic gates, rather than just the two-input versions shown in Chapter 6.
  2. In Table 8.1 of Bebop Bytes Back, consider the first three types of instructions, labeled in the leftmost column as "Loads and Stores", "Arithmetic", and "Logical". (Side issue: The word "Arithmetic" is used in this table in an usual manner, namely, as an adjective rather than as a noun, that is, in the sense of "Arithmetic Instructions", rather than as "arithmetic" per se. Should the word be pronounced any differently, depending upon whether it is being used in the adjectival or the nounal sense?) Of the total of seven instructions that are shown in these three categories, five (LDA, ADD, AND, OR, and XOR) are described as having some effect on "a byte from memory into the accumulator". That might seem to imply both (i) that the original byte is taken out from memory, and also (ii) that its contents then affect the contents of the accumulator. Are (i) and (ii) both true? Which is not fully accurate, and what does actually occur, rather than exactly what is stated in the table? This is an extremely common error that appears and reappears many times in Computer Science terminology. Likewise, the description of the STA instruction is "Store the accumulator to a byte in memory." What value is present in the accumulator after this instruction has been carried out? Have the contents of the accumulator been emptied out? What does, in fact, happen? Can you think of better names for these instructions, names that are very precisely descriptive of what actually happens when the instruction executes than the standard names used in the computer industry?
  3. The Beboputer has only one basic instruction for addition, called ADD (there is a second addition instruction, ADDC, but as we shall see later this instruction is a minor variation on the basic ADD instruction), and likewise there is only one basic instruction, SUB, for subtraction (plus its variant, SUBC). Some computers have several variations on the basic addition instruction, such as one instruction to carry out the addition of unsigned numbers, and a separate instruction to carry out the addition of either two'- or one's-complement numbers. A few very recent machines have a separate instruction to carry out addition according to the rules of Saturation Arithmetic. Are all three kinds of addition instructions necessary? In what ways would the execution of these instructions differ? Which one(s) might you be willing to get rid of, and why? How would you replace the functionality of each instruction that you have decided you could eliminate? Would there be any need for both a Ones'-Complement and a "Two's-Complement addition? Why, or why not? Consider the five kinds of integer arithmetic that we are discussing in this course: Unsigned Numbers, Signed Integers, Ones'-Complement, Two's-Complement, and Saturation Arithmetic. Is a "subtract" instruction necessary for any of them? Why or why not? Remember in each case that an instruction must be carried out upon the entire contents of the register, which has a fixed number of bits, and that the result must also be stored in its entirety in a register of the same size. An extra bit can be provided in the processor for temporary use while the instruction is being executed, but by the time instruction execution is complete the results have to be entirely squeezed into the standard sized register.
  4. On page 8-7 of Bebop Bytes Back, a detailed rationale is presented for providing separate instructions for INCA and DECA. An equally compelling rationale is presented on pages 8-8 and 8-9 for not providing separate instructions for NOT, NAND, NOR, and XNOR. Do you find these rationales to be consistent with each other? Why or why not? Would you consider having one policy which would apply to all six instructions, i.e., either implement all six as separate instructions or don't implement any of them? What would you recommend?
  5. What is the difference between an Assembly Language HALT instruction and the .END assembler directive? How many of each does your program require, and why?

Review & Study: Quick Quiz #5 (end of Chapter 5), Quick Quiz #7 (end of Chapter 7). and relevant questions from Quick Quiz #8 (end of Chapter 8) and Quick Quiz # 12 (end of Chapter 12). Also, Review Questions on Digital Computer Internals, Review Questions on Binary Integer Arithmetic, and Review Questions on Machine Code and Assembly Language.

Learning by Doing:

  1. Power-up your Beboputer simulator and follow all the directions for Lab 7 on pages 12-55 through 12-60.

Deliverable:

You will be assigned to a group to carry out the following assignment: Write a Beboputer Assembly Language program to carry out the functions implied by each of the C language statements listed below. In each case:

    1. define memory locations to hold both the input values that the program needs to execute and the output values;
    2. code the entire program yourself, i.e., do NOT make use of the subroutines packaged with the Beboputer simulator; and

    1. design sets of test data that can be used to ascertain whether or not your program is functioning correctly, load each set of test data into your input locations using either the hex keypad or the Memory Walker, run your program with the test data, read your results from the Memory Walker, and record them. You are not required to perform any output operations, such as outputting the result of the arithmetic operation to the LED display. The problem of how to design the test data is a potential fertile one for discussions on the class discussion facility (Web Board).

    1. For each set of test data on which you run your program, examine and also record the contents of the Status Register (Z, N, C, and V bits only).

Please note that the principal issue for this assignment is the adjustment of the status flags. There is a tutorial that covers the issue of adjusting status flags, and that incorporates several code examples in which soft status flags are set for all four status bits while implementing addition of double-precision numbers using Ones'-Complement arithmetic. Please consult that tutorial for further information and assistance.

There are two additional points to note regarding the above-referenced tutorial. First, the tutorial deals only with the case of Ones'-Complement arithmetic, because this is the most difficult form of integer arithmetic to emulate on a Two's-Complement machine. Once you understand how the status flags can be handled for Ones'-Complement arithmetic, it is relatively easy to carry out the emulation for Unsigned-Number arithmetic. The second important point to note is that the tutorial covers the performance of double-precision integer arithmetic, whereas the current assignment requires only ordinary single-precision arithmetic. Please ignore the double-precision aspect for now the multiple-precision aspect of the examples given in the tutorial; this issue will be revisited in a future assignment.

      1. C = A + B; (In this case, A, B, and C are to be related to each other by the rules of Ones'-Complement arithmetic, but note that the Beboputer's ADD instruction operates in accordance with the rules of Two's-Complement arithmetic, and that therefore the values of the four flags in the Status Register that signal various features about the most recent arithmetic or logical operation might need to be adjusted to represent what they should be for Ones'-Complement arithmetic.)
      2. C = A + B; (In this case, A, B, and C are to be related to each other by the rules of Unsigned-Number arithmetic, but note that the Beboputer's ADD instruction operates in accordance with the rules of Two's-Complement arithmetic and that therefore the values of the four flags in the Status Register that signal various features about the most recent arithmetic or logical operation might need to be adjusted to represent what they should be for Unsigned-Number arithmetic.)

NOTE on the generation of test data: Good programming practice requires that a substantial amount of thought be devoted to the production of an appropriate set of data to be used for testing the program. First, do a simple test, such as addition of +4 and of +3, just to make sure that the program accomplishes the basic addition correctly. Also do the sum of a positive number and a negative number. Once you have confirmed that your program works and that it obtains the correct results for simple data, then try some test data that stress the system just beneath and then just beyond its limits: add a pair of positive numbers whose sum is barely representable in the designated arithmetic representational system, and then a pair of numbers whose sum just barely exceeds the maximum representable. Do the same for two pairs of negative numbers. When you design your test data, before you run them in your program, write down what results you expect to obtain in terms of contents of memory location C, and also what you predict for the contents of the four flags in the Status Register (ignore the I flag; that will be covered later on in the course). If you obtained something different from what you expected, attempt to ascertain why. If you can't figure it out, don't stay up all night worrying about it. Give it a good shot, but if you don't get it, then let's discuss it in the course discussion facility (web board).

Format for the presentation of test data:

A

B

C

Status Flags

Decimal

Numeric

Value

Hex

Represen-tation

Decimal

Numeric

Value

Hex

Represen-tation

Hex Represen-tation

Decimal

Numeric

Value

Z

N

V

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Computer Org. & Arch. Assignment 4:

Readings: Bebop Bytes Back:

  1. Chapter 8: Rampaging Around a CPU (pages 8-17 through 8-50)
  2. NOTE: The sequence of steps involved in the CPU's carrying out a single instruction and that are illustrated in the text for an LDA instruction (Figure 8.42), for an ADD instruction (Figures 8.43 and 8.44), and an STA instruction (Figure 8.45) are referred to, for obvious reasons, as microinstructions.

  3. Chapter 8: Rampaging Around a CPU (pages 8-50 through 8-74 top)

NOTE that in the third paragraph on page 8-58, the text should read, ". . . SETC and CLRC for the carry flag."

Points to Ponder as you do your reading:

  1. On pages 8-32 through 8-34 of Bebop Bytes Back, the operation of the Overflow Flag is described in detail. For Two's-Complement addition, and also for Ones'-Complement addition, the condition for the operation of the Overflow Flag is considered to be that the flag is set when the carry-in to the Most Significant Bit (MSB) is different from the carry-out from it. This means that either if the carry-in is '0' and the carry-out is '1', or if the carry-in is '1' and the carry-out is '0', then the Overflow Flag is set to '1'. On the other hand when both the carry-in and the carry-out are '0', or when they are both '1', then the Overflow Flag is cleared to '0'. Consider the primal definition of overflow: the state where the numerical result of an operation exceeds the capacity of the register to store it. Explain what is happening numerically under the both circumstances where the carry-out is different from the carry-in, and how this equates to overflow, and also explain what is happening numerically under both circumstances where the carry-out is identical to the carry-in, and why this corresponds to the absence of overflow.
  2. With reference to Table C.2 on pages C-14 and C-15 of Bebop Bytes Back, calculate what is the minimum design length (number of bits) that would have been possible for the op codes of the Beboputer, under the assumption that all op codes have the same length.
  3. Find the error in the two lines of calculations shown near the top of page 12-23 in Bebop Bytes Back, and the error in Figure 12.26 on page 12-28.
  4. Is the Beboputer's "Big Immediate" addressing mode (pages 12-29 to 12-30) truly a different addressing mode from the ordinary Immediate addressing mode? Justify your answer.
  5. Microinstructions are described on pages 8-50 to 8-55 of Bebop Bytes Back for three CPU operations: LDA, ADD, and STA. First, for each of the microinstructions illustrated in Figures 8.42 to 8.45 provide both a name and a mnemonic. Next, describe a sequence of microinstructions that would implement the Beboputer operations AND, DECA, and ROLC. Define additional microinstructions, with names and mnemonics, as necessary.
  6. On page 8-58 of Bebop Bytes Back, the assertion is made that the designers of the Beboputer could have implemented additional instructions, such as SETC and CLRC (Set Carry Flag and Clear Carry Flag). Furthermore, it is stated that had they implemented SETC and CLRC, then it would have been possible to eliminate the ADD and the SUB instructions, because these could be carried out by means of the ADDC and SUBC instructions in combination with CLRC and SETC. This assertion is obviously correct, but would it have been a good idea to do so? What would be the consequences for program length and program execution time if the ADD and SUB instructions had been dropped and needed to be replaced by combinations of ADDC and SUBC with CLRC and SETC?
  7. Continuing along the lines of the previous point, the issue of whether to implement an additional processor instruction, as opposed to carrying out the intent of the instruction by executing instead a series of simpler instructions, is the major issue in the CISC vs. RISC debate. A CISC (Complex Instruction Set Computer) architecture is based on a large number of instructions, having in total an extremely broad range of capabilities. A RISC architecture (Reduced Instruction Set Computer) utilizes a considerably smaller number of instructions having a smaller overall range of capabilities. When a RISC machine is called upon to carry out an operation that could be effected in a CISC machine via a single instruction, this is accomplished by emulating the capabilities of the CISC instruction in software. The result is that the length of the machine-language (or Assembly Language) program is increased. However, reducing the burden on the Control Logic of having to implement many instructions frees up some of the "real estate" on the processor chip to be used for something else. The space saved is usually used to increase the number of registers. You have already experienced the scheduling difficulties involved in having only a single general-purpose register (accumulator), as in the Beboputer. Every time you need to use the accumulator for something else, you must first copy out the current value to a storage location, then load in the new value, perform whatever calculation or logical operation is required, and then store the new answer before reloading the prior value. All this takes up machine cycles and time. CISC machines typically have several general-purpose registers. Consequently, when it is necessary to change the focus of operations from one datum or several data to others, there is a limited capability to leave the prior data where they are in the register set and to use other registers for the new data. Leaving the earlier data in the registers makes it easy to come back to them later. In a RISC machine there are usually many more registers, thus greatly reducing the number of times when it is necessary to offload register contents to make room for new data, and later have to reload the former data to allow new computation to be done. Question: If you were a computer engineer, how would you decide whether to design in RISC or in CISC?

Review & Study: Appropriate questions from Quick Quiz #8 (end of Chapter 8). Also, Review Questions on Machine Code and Assembly Language.

Deliverable:

You are required to do a group term project, for which you may form your own groups. The project will take the form of a paper, accompanied by a PowerPoint-based slide presentation. You must select and begin to do research on a topic for your term project. You have four options for your term project. Two of them involve library research and the production of a predominantly text-based term paper, and the other two involve the writing of Beboputer assembly language programs. In the latter case, the term paper will consist of a well-annotated program or set of programs. In all cases, your slide presentation will cover the highlights of either the subject area or your program and test data. Please see the accompanying file which provides further instructions regarding your Term Project. The specific options are:

    1. Standard Option: Select a topic in the general area of Computer Organization and Architecture from the list of approved topics.
    2. Student-Generated Topic Option: Suggest your own topic, which must also be in the general area of Computer Organization and Architecture, and submit your suggested topic to your instructor for approval. If it is disapproved, then you may either submit another topic for approval or else select one of the other options. A maximum of two student-suggested topics will be processed for each group.
    3. Arithmetic Instruction Option: Write a set of Beboputer assembly language programs to implement several arithmetic C++ language statements, in accordance with the instructions found in the accompanying document on the Arithmetic Instruction Option for the Term Project.
    4. INFOSEC-Related Project Option: Write a Beboputer assembly language program to implement a Reference Model. Detailed explanation for this project is provided in an accompanying document which describes the INFOSEC Option.

Your term project will be presented to the class during course Week 6.

 

 

Computer Org. & Arch. Assignment 5:

Readings: Bebop Bytes Back:

    1. Chapter 8: Rampaging Around a CPU (pages 8-74 through 8-89)
    2. Appendix C: Addressing Modes and Instruction Set (pages C-1 through C-9)
    3. NOTE that these pages from Appendix C are principally a review of the material at the end of Chapter 8.

    4. Chapter 12: Assembly Language and Stuff (pages 12-33 through 12-55 and 12-60 through 12-78)

Points to Ponder as you do your reading:

    1. Instructions for the Beboputer are of three different lengths. All instructions that use the Implied Mode form of addressing are one byte in length, and all instructions that use the Absolute Mode, Indexed Mode, Indirect Mode, Pre-Indexed Indirect Mode, or Indirect Post-Indexed Mode are three bytes in length. In the case of Immediate Mode instructions, most are two bytes in length but some are three bytes long. Which of the Immediate Mode instructions are three bytes long, and why?

Review & Study: Remaining questions from Quick Quiz #8 (end of Chapter 8). Quick Quiz #12 (end of Chapter 12 in Bebop Bytes Back): questions 4 and 5-7. Also, Review Questions on Machine Code and Assembly Language.

Learning by Doing:

    1. Power-up your Beboputer simulator and follow all the directions for Lab 5 on pages 10-15 through 10-20.
    2. Power-up your Beboputer simulator and follow the directions for the continuation of Lab 7 on pages 12-60 through 12-62.

Deliverable:

You will be assigned to a group to carry out the following assignment: Write a Beboputer Assembly Language program to carry out the functions implied by each of the C language statements listed below. In each case:

    1. define memory locations to hold both the input values that the program needs to execute and the output values;
    2. treat all input variables as triple-precision numbers (i.e., as three-byte integers), and make the output variables as big in terms of multiple-precision as they need to be to hold all possible outputs (Note that the tutorial provides code examples for double-precision numbers);
    3. code the entire program yourself, i.e., do NOT make use of the subroutines packaged with the Beboputer simulator; and

    1. design sets of test data that can be used to ascertain whether or not your program is functioning correctly, load each set of test data into your input locations using either the hex keypad or the Memory Walker, run your program with the test data, read your results from the Memory Walker, and record them. You are not required to perform any output operations, such as outputting the result of the arithmetic operation to the LED display. The problem of how to design the test data is a potential fertile one for discussions on the class discussion facility (Web Board).
    2. For each set of test data on which you run your program, examine and also record the contents of the Status Register (Z, N, C, and V bits only).

Every group is required to do item 1. In addition, each group will also be assigned by the section instructor to do either item 2 or item 3:

      1. C = A + B; (This item makes use of the native mode of the Beboputer, in which A, B, and C are related to each other by the rules of Two's-Complement arithmetic.)
      2. C = A + B; (In this case, A, B, and C are to be related to each other by the rules of Ones'-Complement arithmetic, but note that the Beboputer's ADD instruction operates in accordance with the rules of Two's-Complement arithmetic.)
      3. C = A + B; (In this case, A, B, and C are to be related to each other by the rules of Unsigned-Number arithmetic, but note that the Beboputer's ADD instruction operates in accordance with the rules of Two's-Complement arithmetic.)

 

 

Computer Org. & Arch. Assignment 6:

Readings: Bebop Bytes Back:

  1. Appendix D: Interrupts and Interrupt Handling (pages D-1 through D-27)
  2. Optional: Peleg, Alex; Wilkie, Sam; & Weiser, Uri (1997). "Intel MMX for Multimedia PCs." Communications of the ACM, 40 (1): 25-38.

Deliverable:

Term Project will be presented to the class towards the end of the week.

 

 

Last revised 08 May 2000