|
Section 8: Program Editing127
|
|
|
|
Before you can run the AREA program, you must initialize it.
|
|
Initializing a Program
|
|
When you initialize a program, all you do is set up all of the
required inputs and mode settings prior to the actual running of it.
Some programs contain initializing routines that set up the data to
run the program. In other programs, like AREA, you may have to
initialize the program manually from the keyboard.
|
|
In our AREA program, we must place the height (h) into the Y-register of
the stack and the radius (r) into the X-register. To initialize AREA with
the values of 50 inches for h and 11 inches for r:
|
|
|
|
The AREA program, which solves for the total area of a cylinder, is
now initialized for height 50 inches and radius of 11 inches.
|