74 Section 6: Programming Basics

Keystrokes

Display

4

4

¦254.4690

240.3318

l1

133.5177

l2

939.3362

l3

769.6902

Enter h of third can. VOLUME of third can. SURFACE AREA of third can. Sum of BASE AREAS.

Sum of VOLUMES.

Sum of SURFACE AREAS.

The preceding program illustrates the basic techniques of programming. It also shows how data can be manipulated in Program and Run modes by entering, storing, and recalling data (input and output) using v, O, l, storage register arithmetic, and programmed stops.

Further Information

Program Instructions

Each digit, decimal point, and function key is considered an instruction and is stored in one line of program memory. An instruction may include prefixes (such as ´, O, t and b) and still occupy only one line. Most instructions require one byte of program memory; however, some require two. For a complete list of two-byte instructions, refer to Appendix C.

Instruction Coding

Each key on the HP-15C keyboard – except for the digit keys 0 through 9 – is identified in Program mode by a two-digit ―keycode‖ that corresponds to the key's position on the keyboard.

InstructionCode

 

O+1

006-44,40, 1

Sixth program line.

´eV

XXX-42, 5,25

eis just ―5‖.

The first digit of a keycode refers to the row (1 to 4 from top to bottom), and the second digit refers to the column (1, 2, 9, 0 from left to right). Exception: the keycode for a digit key is simply that digit.