This program is Copyright © 1977 by Hewlett-Packard Company and is used here by permission. It was originally printed in the HP-95C Applications book. This program was entered by André Wilhelmus and the curator added comments from the HP manual.
This program is supplied without representation or warranty of any kind. André Wilhelmus, 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.
CODE | KEYS | |
---|---|---|
A-000 lbl A | f LBL A | |
A-001 62 12 | g CLEAR REG | Initialize |
A-002 66 | ∙ | |
A-003 5 | 5 | |
A-004 2 | 2 | |
A-005 8 | 8 | |
A-006 4 | 4 | |
A-007 1 | 1 | |
A-008 6 | 6 | |
A-009 39 | × | |
A-010 35 0 | STO 0 | |
A-011 53 7 | GSB 7 | Generate random |
A-012 35 1 | STO 1 | submarine position. |
A-013 53 7 | GSB 7 | |
A-014 35 2 | STO 2 | |
A-015 1 | 1 | |
A-016 35 .1 | STO . 1 | |
A-017 0 | 0 | |
A-018 64 | R/S | - - - - - - - - - - - - - - - |
A-019 61 63 1 | f LBL 1 | |
A-020 45 .0 | RCL . 0 | Toggle for submarine |
A-021 1 | 1 | movement after sonar. |
A-022 61 41 | f x=y | |
A-023 49 | − | |
A-024 35 .0 | STO . 0 | |
A-025 64 | R/S | - - - - - - - - - - - - - - - |
A-026 61 63 7 | f LBL 7 | Link to random # gen. |
A-027 62 63 C7 | g JUMP C 7 | - - - - - - - - - - - - - - - |
b-000 lbl b | f LBL B | |
b-001 45 .1 | RCL . 1 | Toggle for sonar sensitivity. |
b-002 1 | 1 | |
b-003 61 41 | f x=y | |
b-004 59 | + | |
b-005 35 .1 | STO . 1 | - - - - - - - - - - - - - - - |
C-000 lbl C | f LBL C | Sonar reading. |
C-001 45 .1 | RCL . 1 | |
C-002 35 59 8 | STO + 8 | |
C-003 35 6 | STO 6 | |
C-004 12 | R↓ | |
C-005 53 8 | GSB 8 | |
C-006 45 .0 | RCL . 0 | |
C-007 35 5 | STO 5 | |
C-008 53 9 | GSB 9 | |
C-009 45 3 | RCL 3 | 0. or 1. |
C-010 64 | R/S | - - - - - - - - - - - - - - - |
C-011 62 63 d6 | g JUMP D 6 | Link to status display. |
C-012 61 63 9 | f LBL 9 | - - - - - - - - - - - - - - - |
C-013 53 7 | GSB 7 | |
C-014 4 | 4 | |
C-015 11 | x⇔y | |
C-016 61 44 | f x>y | |
C-017 63 0 | GTO 0 | Movement of ± 1 unit |
C-018 45 5 | RCL 5 | |
C-019 22 | CHS | |
C-020 35 5 | STO 5 | |
C-021 61 63 0 | f LBL 0 | |
C-022 53 7 | GSB 7 | |
C-023 5 | 5 | |
C-024 61 44 | f x>y | |
C-025 63 0 | GTO 0 | |
C-026 1 | 1 | Select movement in |
C-027 63 1 | GTO 1 | row or column |
C-028 61 63 0 | f LBL 0 | |
C-029 2 | 2 | |
C-030 61 63 1 | f LBL 1 | |
C-031 35 52 | STO I | |
C-032 61 45 | f RCL i | |
C-033 45 5 | RCL 5 | |
C-034 59 | + | |
C-035 62 43 | g x<0 | |
C-036 63 0 | GTO 0 | |
C-037 9 | 9 | Is move on playing board? |
C-038 11 | x⇔y | |
C-039 61 43 | f x≤y | |
C-040 63 1 | GTO 1 | |
C-041 61 63 0 | f LBL 0 | |
C-042 45 5 | RCL 5 | |
C-043 2 | 2 | |
C-044 39 | × | |
C-045 49 | − | |
C-046 61 63 1 | f LBL 1 | Store next position |
C-047 61 35 | f STO i | |
C-048 45 3 | RCL 3 | - - - - - - - - - - - - - - - |
C-049 61 53 | f RTN | |
C-050 61 63 8 | f LBL 8 | |
C-051 45 2 | RCL 2 | |
C-052 49 | − | |
C-053 11 | x⇔y | |
C-054 45 1 | RCL 1 | |
C-055 49 | − | Response to sonar or |
C-056 62 6 | g →P | depth charge. |
C-057 45 6 | RCL 6 | |
C-058 49 | − | |
C-059 66 | ∙ | |
C-060 9 | 9 | |
C-061 49 | − | |
C-062 62 43 | g x<0 | |
C-063 63 0 | GTO 0 | |
C-064 0 | 0 | |
C-065 63 1 | GTO 1 | |
C-066 61 63 0 | f LBL 0 | |
C-067 1 | 1 | |
C-068 61 63 1 | f LBL 1 | |
C-069 35 3 | STO 3 | |
C-070 61 53 | f RTN | - - - - - - - - - - - - - - - |
C-071 61 63 7 | f LBL 7 | |
C-072 61 21 0 | f FIX 0 | |
C-073 45 0 | RCL 0 | |
C-074 9 | 9 | |
C-075 9 | 9 | |
C-076 7 | 7 | |
C-077 39 | × | Random # generator. |
C-078 62 1 | g FRAC | |
C-079 35 0 | STO 0 | |
C-080 1 | 1 | |
C-081 0 | 0 | |
C-082 39 | × | |
C-083 61 1 | f INT | |
C-084 61 53 | f RTN | - - - - - - - - - - - - - - - |
d-000 lbl d | f LBL D | |
d-001 1 | 1 | Depth charge. |
d-002 35 59 7 | STO + 7 | |
d-003 0 | 0 | |
d-004 35 6 | STO 6 | |
d-005 12 | R↓ | |
d-006 12 | R↓ | |
d-007 53 8 | GSB 8 | Compute response |
d-008 62 42 | g x≠0 | Hit? |
d-009 63 0 | GTO 0 | - - - - - - - - - - - - - - - |
d-010 1 | 1 | |
d-011 35 5 | STO 5 | Move submarine after |
d-012 53 9 | GSB 9 | depth charge. |
d-013 64 | R/S | |
d-014 63 6 | GTO 6 | - - - - - - - - - - - - - - - |
d-015 61 63 0 | f LBL 0 | |
d-016 5 | 5 | |
d-017 35 52 | STO I | Submarine hit! |
d-018 5 | 5 | |
d-019 0 | 0 | Send "SOS" |
d-020 5 | 5 | |
d-021 61 63 1 | f LBL 1 | |
d-022 61 64 | f PAUSE | |
d-023 62 52 | g DSZ | |
d-024 63 1 | GTO 1 | |
d-025 64 | R/S | - - - - - - - - - - - - - - - |
d-026 61 63 6 | f LBL 6 | |
d-027 61 21 2 | f FIX 2 | |
d-028 45 7 | RCL 7 | Display status |
d-029 45 8 | RCL 8 | |
d-030 23 | EEX | |
d-031 2 | 2 | |
d-032 24 | ÷ | |
d-033 59 | + | |
d-034 61 53 | f RTN | - - - - - - - - - - - - - - - |
d-035 61 63 8 | f LBL 8 | Link to movement and |
d-036 62 63 C8 | g JUMP C 8 | response routines. |
d-037 61 63 9 | f LBL 9 | |
d-038 62 63 C9 | g JUMP C 9 |
Go back to the HP-95C software library
Go back to the general software library
Go back to the main exhibit hall