Writing Programs |
Pep/8 is a virtual machine for writing machine language and assembly language programs. It is designed to be used with the textbook, Computer Systems, J. Stanley Warford, Fourth edition, Jones and Bartlett, Publishers, 2010. The goal of the book is to teach the fundamentals of the classic von Neumann machine. You should use the Pep/8 system in conjunction with the textbook to write machine language and assembly language programs.
Topics: Viewing panels, Input and output, Endless loops, File extensions.
When you click in one of the panes inside a panel it becomes the active pane, which is indicated by the blue color of its label at the top of the pane. If you double click on the label the pane will expand to its maximum height. The following screenshot shows the label at the top of the Source Code pane in the code panel.
When you execute in batch mode, you must enter the input in the Input pane before you run your program. The output will appear in the Output pane as the program executes.
Your program executes in interactive mode when you select the Terminal I/O tab. In this mode, executing an input statement in your program will make the program pause and wait for you to enter the input in the Input/Output pane. The executing program accepts your input and continues executing when you press the enter or return key.
.
on a
Mac or <control>+.
on a Windows computer.
Or, you can select Build->Interrupt Execution from the menu.
Either of these actions will pause execution of the program, allow you to use the debugging tools,
and, if you wish, continue execution of your program.
Alternatively, you can terminate execution of your program by selecting Build->Stop Debugging from the menu or clicking the Stop icon in the tool bar.
.pep
is the file extension for source code programs.
.pepo
is the file extension for object code programs.
.pepl
is the file extension for the formatted program listing.
All these files are text files that you can modify with your favorite text editor or word processor outside the Pep/8 application.
When you open a .pep
file, it opens in the Source Code pane.
When you open a .pepo
file, it opens in the Object Code pane.
Although you can save a .pepl
file, there is no facility for inputting it into the Pep/8 application.