Spring 2002 COMP 122 Peter Smith

Handout #9

PEP/7

What is it?

The PEP/7 program is an integrated environment allowing you to create assembly code or object code programs for the PEP/7 machine, to assemble source code and to load and run object code files.

Where is it?

You can find the PEP/7 program on the PCs in the Pentium labs (EA1210 and EA1214); it should also be in EN2153. If you do not see a shortcut icon (looking a little like a yellow jigsaw puzzle piece), look for Pep/7 in the list of programs. There are versions for the Mac and Unix available from the Pepperdine ftp site

ftp://ftp.pepperdine.edu/pub/compsci/pep7

though these may take some effort to install. This handout is oriented towards the Windows version.

Getting your own copy

The PC version of PEP/7 runs under Windows (3.x, 95, 98, 2000 or NT). If you have access to your own Windows system, I strongly advise that you get your own copy. There is a self-extracting executable file (called pep7v0.exe) available from my account via the 122 course page and also on the Pepperdine ftp site referenced above.

How do I create a PEP/7 source file?

There is an editor built in to the Pep/7 environment. If you plan to use the CSUN labs for the assignments I recommend that you get a floppy disc and keep your programs and related files on that. There is no guarantee that files created on a particular hard disc in a lab will be there next time you use that computer.

You can use the PEP/7 editor (File menu option) to create or modify an assembly code or an object code file. Note that any hexadecimal letters in an object file must be upper case (except for the program terminator which is zz).

How do I assemble a program?

Assembly code programs must be assembled before being loaded and run. You can do this in one, two or three steps - see the options in the Pep/7 menu. Successful assembly creates an object code file.

If the assembly is successful, a listing file can be created showing the source and its translation. You can create one using the Assembler Listing option in the Pep/7 menu.

If the assembly is unsuccessful, error messages will be shown in red. You do not need to remove these messages; they are ignored by the assembler.

How do I run an object program?

If the current window contains an object program use the load/execute command. If the current window contains assembly code then use assemble/load/execute command.

If the program requires input then use the Execution Input menu item in the Pep/7 menu prior to running it to indicate if input is coming from the keyboard or a window.

Getting printed output

You can use the Print option in the File menu to print the active window or use Save As or Save to save the window to (your) disc for later printing.