Computer Science Illuminated

eLearning
Interactive Review

Animated Flashcards
Live Wire
Cryptic Crossword Puzzles
Ethical Issues
Biographical Sketches
Did You Know?
Goin Live
Digital Lab Manual
Online Glossary
The Learning Store
Language Library
Download PEP/7
Instructor Resources
Student Resources

eLearning Home

Pep/7 Machine Language

Download the Cover Sheet for this lab as an Adobe PDF. This can be used to record your answers to the questions in the lab.

There are three machine-language programs with this lesson: progL1, progL2, and progL3.

  • Open the Pep/7 simulator and click on the BlackBox icon.

  • Click on the File menu and progL1. Then click Pep/7 window and click on Load/Execute. What is printed?

  • Repeat the steps with progL2. What is printed?

  • Repeat the steps with progL3. What is printed? Can you figure out what is happening? Where did the characters that are printed come from? Go to page 217 of CS Illuminated and read about Execution Input. Change the input to Interactive Input From Keyboard and rerun the program. What did you input? What was output? Now do you know what the program is doing?


Using the program on page 209 of CS Illuminated as a guide.

  • Write an algorithm for a machine language program that prints your initials.

  • Implement your algorithm, using immediate-mode addressing.

  • Run your program using the Pep/7 machine language simulator. What is printed?

  • Implement your algorithm, using direct-mode addressing.

  • Run your program using the Pep/7 machine language simulator. What is printed?


  • Write an algorithm for a machine language program that prints the name of your state. (Apologies to those of you who live in Massachusetts and New Hampshire.)

  • Implement your algorithm, using immediate-mode addressing.

  • Run your program using the Pep/7 machine language simulator. What is printed?
 
Educators: More Information About This Text Other Computer Science Titles at Jones and Bartlett
Copyright 2010 Jones and Bartlett PublishersContact webmaster