HP 15c User Manual

Page 72

Advertising
background image

72

Section 6: Programming Basics

Keystrokes

Display

´bA

001-42,21,11 Assigns this program the label

―A‖.

O 0

002- 44 0 Stores the contents of X-register

into R

0

. r must be in the X-

register before running the
program.

|x

003- 43 11 Squares the contents of the X-

register (which will be r).

|$

004- 43 26

*

005- 20

r

2

, the BASE AREA of a can.

O 4

006- 44 4 Stores the BASE AREA in R

4

.

O + 1

007-44,40, 1 Keeps a sum of all BASE

AREAS in R

1

.

¦

008- 31 Stops to display BASE AREA

and allow entry of the h value.

*

009- 20 Multiplies h by the BASE

AREA, giving VOLUME.

´ ©

010- 42 31 Pauses briefly to display

VOLUME.

O + 2

011-44,40, 2 Keeps a sum of all can

VOLUMES in R

2

.

l 0

012- 45 0 Recalls r.

÷

013- 10 Divides VOLUME by r.

2

014- 2

*

015- 20 2

rh, the SIDE AREA of a can.

l 4

016- 45 4 Recalls the BASE AREA of the

can.

2

017- 2

Multiplies base area by two (for

top and bottom).

*

018- 20

Advertising