Fourth Edition – Pep/8
Assembler and Simulator Downloads
This page is for the latest version of the Pep/8 simulator and assembler for use with the textbook Computer Systems, fourth edition. The application is written in C++ and is compiled with the Qt 5 development environment using the Qt Creator IDE available from Digia Plc. at http://www.qt.io/download/.
CPU Simulator Downloads
This page is for the latest version of the Pep/8 CPU simulator for use with the textbook Computer Systems, fourth edition. The application is written in C++, is GUI-based, and is compiled with the Qt 5 development environment using the Qt Creator IDE available from Digia Plc. at http://www.qt.io/download/.
Cache Simulator Download
This contribution by Professor Peter Smith, California State University Channel Islands, is a command-line interface implementation of the cache shown in Figures 12.32 and 12.33 of the textbook. The user determines the structure of the cache by specifying the block size, the number of blocks per row, and the number of rows. A selection of 1 for the number of blocks per row is equivalent to the direct-mapped cache of Figure 12.29, while a number greater than 1 is equivalent to the set-associative cache of Figure 12.30.
In addition, the user determines whether instructions and data share the cache. If there are separate caches for instructions and data then half the rows are used for each.
The user can select one of four replacement algorithms: random, least recently used (LRU), least frequently used (LFU) and first-it, first-out (FIFO). The discussion of replacement algorithms in Chapter 12.2 in Computer Systems is brief and only mentions the LRU algorithm. Replacement algorithms for cache line replacement are similar to those for page replacement described in Chapter 9.2, which also describes the FIFO algorithm. With LFU, a count is maintained for each line that is hit in the cache, and that line is chosen for replacement that has the smallest count. With the random algorithm, a line is selected at random for replacement.
The cache simulator collects performance statistics on Pep/8 machine language programs. It loads the Pep/8 operating system and runs Pep/8 object programs produced by the Pep/8 assembler.
The C source code and documentation is for version 3.5.2 of the Pep/8 cache simulator.
Command Line Simulator Download
This page is for the command line version of the Pep/8 CPU assembler and simulator for use with the textbook Computer Systems, fourth edition. Because the assembler and simulator are command line apps, instructors can invoke them with command line scripts to automate the testing and grading of student assignments.
When you uncompress the source code, a directory is produced containing the source code for the assembler and simulator, a
makefile, some auxiliary files, all the programs from the book, and a
readme file, which describes the content in further detail. On the command line,
cd to the directory that contains the
makefile and execute
make to compile the assembler and simulator. See the
readme file for further instructions.
The C++ source code and documentation is for version 8.1.0 of the Pep/8 command line assembler and simulator.
BrainF**k Simulator Download
This contribution by Christine E. Meyer, a student at University of Illinois at Springfield, is a Pep/8 assembly language implementation of the famous esoteric programming language BrainF**k. See here for a description of the language. The simulator runs a compiler that takes input from the source program terminating in a
* sentinel then executes the compiled code. You can paste the following program into the Pep/8 Input pane and run the simulator. The program outputs