[Chapter 5] [Home] [Glossary] [Previous Slide] [Next Slide]

[5.9] An Assembly Language Example

A sample program to add two numbers:
RD A       Read a number into memory location A.
RD B       Read a second number into memory location B.
CLA A      Clear the ALU and add the number in A to it.
ADD B      Add the number in B to the ALU.
ST SUM     Store the result from the ALU into location SUM.
PRT SUM    Send the number in SUM to the printer.
HALT       Stop processing.

[Chapter Contents] [Home] [Glossary] [Previous Slide] [Next Slide]