Pep/8 Downloads

Fourth Edition

Assembler and Simulator Downloads

pep8iconThis 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/

The current version of the Pep/8 assembler and simulator is 8.2. See what’s new with this release. Please send comments, bug reports, and feature requests to Stan Warford.

 

CPU Simulator Downloads

Pep8cpu-iconThis 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/.

The current version of the Pep/8 CPU simulator is 8.2. See what’s new with this release. Please send comments, bug reports, and feature requests to Stan Warford.

 

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.

Download Source

Command Line Simulator Downloads

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.

Download Source

BrainF**k Simulator Download

This contribution by Christine E. Meyer, a student at University of Illinois at Springfield, is a Pep/9 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/9 Input pane and run the simulator. The program outputs Hello World!.

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.*

Download Brain F**ck