\chapter{Conclusion} \section{Objectives Achieved} The CAL tool {\rm newogg} was written to enhance {\rm oggin} to make it an informative and effective teaching aid by changing the format and enriching the contents of its output. {\rm newogg} displays picture-like output on the screen after each instruction cycle. Besides the contents of the components of the cpu, {\rm newogg} also displays memory locations accessed during the instruction cycle; the previous, the current and the next instructions in assembly language mnemonics; and an explanation as well as comments for each instruction. Moreover, locations concerned are highlighted when significant changes occur or particular attention is required. Thus the output results are more convenient and impressive for examining the operation of instructions, and the teaching results are more informative and effective. All those objectives have been achieved by {\rm newogg}, implementing the target of this project. \\ \\ Furthermore, the {\rm newogg} also results in an unexpected side-effect that it could be used as a debugging package for {\rm oggin} program. However, to do this requires a method of assembling {\rm oggin} assembly language instructions into {\rm oggin} machine code data, see the following section. \section{Possible Future Development} \subsection{Adding the Assembler} {\rm newogg} is only an interpreter and disassembler. It can be extended to be a complete {\rm oggin} machine by adding the assembler part to it. Thus the input data can be assembly language mnemonics. These are three ways of implementation : \\ \begin{enumerate} \item Join {\rm newogg} to the original {\rm oggin} which, after the assembler part, can be revised to have two choices for different formats of output. The user can select the original interpreter for a copy of one-line output or select {\rm newogg} for demonstrating the results on the screen one by one. \item Write an assembler and add to {\rm newogg} and make it become an independent new virtual machine. \item If the {\rm oggin} program can be used only as an assembler, without it continuing into the interpreter part, then it could be used to assemble a file for {\rm newogg}, either by sending it through a UNIX pipe, or using a temporary intermediate file. \end{enumerate} \subsection{Extensions of the Output} \subsubsection{Creating a Window for Stack} {\rm newogg} was designed to display its output on a vt100 terminal which has a standard screen size of 23 lines and 80 columns. For some instructions, a screen of this size is not big enough to show all the necessary information. With the output of the instruction {\it trp}, for instance, the two fixed addresses (10 and 11 octal) accessed for fetching the address of the trap service routine are not shown on the screen. What is highlighted in the main memory window is the two stack locations accessed, where the pc and psw have been pushed. In other words, the main memory window is showing the stack, ignoring the accessed locations at addresses 10 and 11 octal. If {\rm newogg} is run on a system with a larger screen display, such as a Hewlett Packard Workstation with a screen size of 46 lines and 128 columns, another window could be created to show the stack, including the top forty locations of memory, independently. As a result, the stack is separated from the main memory obviously and all the accessed locations, covered by the main memory or in the stack, can be displayed and highlighted at the same time. \\ \\ \noindent However, showing the stack and the main memory in the same window emphasizes that they are both in the same physical memory. \subsubsection{Grouping the Binary Codes} Binary codes of each instruction are not displayed in the format of three digits in one group, which would be easier to match with each corresponding octal digit. Somebody could revise {\rm newogg} and group the binary digits into six groups. In a system using a bigger screen, the binary values of acc, source and operation result in the comm\_win, can also be revised and displayed in the grouped format. It would be more considerate to the user if corresponding octal codes of those binary values are displayed side by side. \subsection{Implementing Extra Opcodes} The full {\rm oggin} instruction set has three unused opcodes in group 1 and 2080 unused opcodes in group 2, (which could be further subdivided into more groups) see appendix C. If an attempt is make to execute one of these instructions, {\rm newogg} generates an error message. In real processors in real computers, undefined instructions can produce undefined effects. Some processors just ignore the instruction, and some make an exception call to allow the programmer to handle them. The way {\rm newogg} handles those is a bit like an exception call, generating an error and stopping the program. \\ \\ \noindent To add extra instructions to the {\rm newogg} interpreter, you just need to add the required extra selections to the {\it case} statements in {\it newg1.c} and {\it newg2.c} to decode and execute them, and add the extra mnemonics in {\it newm.c} and {\it glovar.h}. (The six files which make up {\rm newogg} are installed in /usr/fsb/wlw/project on {\rm crown} and /user/csplw1/project on {\rm forth}.)