The Museum of HP Calculators


Moving Average for the HP-41C/CV/CX

This program is Copyright © HP and is used here by permission. It was originally printed in the Business Stats Solution Book. This program was entered and uploaded by Tony Duell.

This program is supplied without representation or warranty of any kind. Tony Duell, Hewlett Packard and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Documentation Information (CD or source code)
How to get this Program to your Calculator (via HP-IL, disk, wand, and fingers)
Download Binary (.raw) program for disk or PC HP-IL Card download
Download Hexadecimal (.dat) program for Serial Port download

Program Listing

LINE  KEYS
 01 LBL "AVG"
 02 CLRG
 03 "NO. OF AVGS ?"
 04 PROMPT
 05 1
 06 +
 07 STO 00
 08 3
 09 *
 10 STO 01
 11 "N MAX?"
 12 PROMPT
 13 STO 05
 14 RCL 01
 15 +
 16 FIX 00
 17 CF 29
 18 "SET SIZE "
 19 ARCL X
 20 PROMPT
 21 RCL 00
 22 3
 23 *
 24 .96
 25 -
 26 1 E3
 27 /
 28 4
 29 +
 30 STO 02
 31 2
 32 GTO 04
 33 LBL 03
 34 "N"
 35 ARCL X
 36 "|-?"
 37 CF 22
 38 PROMPT
 39 FC?C 22
 40 GTO "PT"
 41 STO IND 02
 42 CHS
 43 1
 44 ST- 02
 45 RDN
 46 STO IND 02
 47 RDN
 48 1
 49 +
 50 LBL 04
 51 ISG 02
 52 GTO 03
 53 LBL "PT"
 54 CF 22
 55 "DATA ?"
 56 PROMPT
 57 RCL 01
 58 FC?C 22
 59 GTO "AVGS"
 60 1 E3
 61 /
 62 4.00003
 63 +
 64 STO 02
 65 1
 66 -
 67 X<>Y
 68 LBL 01
 69 ST+ IND Y
 70 RCL IND 02
 71 RCL 05
 72 MOD
 73 RCL 01
 74 +
 75 RCL IND X
 76 ST- IND T
 77 ISG IND 02
 78 LBL 00
 79 RDN
 80 RDN
 81 ISG Y
 82 ISG 02
 83 GTO 01
 84 RCL 04
 85 1
 86 -
 87 RCL 05
 88 MOD
 89 RCL 01
 90 +
 91 X<>Y
 92 STO IND Y
 93 GTO "PT"
 94 LBL "AVGS"
 95 CF 29
 96 RCL 01
 97 3
 98 -
 99 .00205
100 +
101 STO 02
102 LBL 02
103 RCL IND 02
104 2
105 ST+ 02
106 RDN
107 RCL IND 02
108 /
109 "MA"
110 FIX 00
111 ARCL IND 02
112 "|-="
113 FIX 04
114 ARCL X
115 PROMPT
116 DSE 02
117 GTO 02
118 GTO "PT"
119 LBL "OUT"
120 RCL 05
121 1 E3
122 /
123 1
124 +
125 STO 02
126 RCL 04
127 LBL 05
128 1
129 -
130 ENTER
131 ENTER
132 RCL 05
133 MOD
134 RCL 01
135 +
136 "PT"
137 FIX 00
138 ARCL 02
139 "|-="
140 FIX 04
141 ARCL IND X
142 PROMPT
143 RDN
144 ISG 02
145 GTO 05
146 GTO "OUT"
147 LBL "UPDATE"
148 XROM 30,07
149 RTN
150 END

Go back to the HP-41 software library
Go back to the general software library
Go back to the main exhibit hall