The Museum of HP Calculators

# QueenBoard for the HP-67

This program is Copyright © 1976 by Hewlett-Packard and is used here by permission. This program was originally published in the HP-67 Games Pac 1.

This program is supplied without representation or warranty of any kind. Hewlett-Packard Company 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.

 QueenBoard Shift Label Move-> Key A B C D E

## Overview

This game is based on the moves of a chess queen. A queen will be allowed to move only to the left, down, or diagonally to the left. The object of the game is to be the first player to move the queen to the lower left-hand corner of the chess board (square 158), by alternating moves between you and the calculator. You start by placing the queen on any square on the top row or right-hand column. This is your first move. The play then alternates.

The playing board is numbered as follows with possible starting positions shown in blue italic and the winning position shown in bold:

 -- S  t  a  r  t -- 81 71 61 51 41 31 21 11 | S t a r t | 92 82 72 62 52 42 32 22 103 93 83 73 63 53 43 33 114 104 94 84 74 64 54 44 125 115 105 95 85 75 65 55 136 126 116 106 96 86 76 66 147 137 127 117 107 97 87 77 158 148 138 128 118 108 98 88

You tell the calculator your moves by keying in the number of the square you start on or move to. Press A and the calculator responds with the square it moves to. Square 158 is the winning square.

DSP 0 mode should be used, so only integers will be displayed. If the program is written to a magnetic card, set DSP 0 before recording.

## Reference

This program is based on an HP-65 Users' Library program by Jacob R. Jacobs.

## Instructions

 Step Instructions Input Data/Units Keys Output Data/Units 1 Load side 1. 2 Key in your starting position (first move). Move A Calculator's move 3 Repeat step 2 until someone wins

## Example

```Keystrokes                     Outputs
55 A                             75.
(You start on 55, and the calculator,
after deep and careful thought,
moves to 75).

97 A                            127.
(You respond with 97, and the calculator,
showing no mercy, moves to 127).

148 A                           158.
(You try 148, hoping the calculator's
batteries run down before it can
respond, but no luck--it wins
by moving to 158).
```

## The Program

```LINE  KEYS
001  *LBL A     Current position.
002   STO 1     RI
003   GSB E
004   1
005   X=Y?
006   GTO 2
007   7
008   STO I     7->RI
009  *LBL 1
010   RCL 1
011   RCL I
012   EEX
013   1
014   x
015   +
016   STO 2     10K + R1->R2
017   GSB E     Position good?
018   1
019   X=Y?
020   GTO 0     Yes, recall R2.
021   RCL I
022   STO + 2   K + R2 -> R2
023   RCL 2     Position good?
024   GSB E
025   1
026   X=Y?
027   GTO 0     Yes, recall R2.
028   RCL I
029   EEX
030   1
031   x
032   STO + 2
033   RCL 2
034   GSB E
035   1
036   X=Y?
037   GTO 0
038   DSZ I
039   GTO 1
040   RCL 1
041  *LBL 2
042   EEX
043   1         Default move.
044   STO + 1   10 + R1 -> R1
045   RCL 1
046   RTN
047  *LBL 0
048   RCL 2
049   RTN
050  *LBL E     Test for good position.
051   1
052   5
053   8
054   X=Y?      158 = R2?
055   GTO 9
056   3
057   1
058   -
059   X=Y?      127 = R2?
060   GTO 9
061   1
062   -
063   X=Y?      126 = R2?
064   GTO 9
065   5
066   1
067   -
068   X=Y?      75 = R2?
069   GTO 9
070   2
071   -
072   X=Y?      73 = R2?
073   GTO 9
074   2
075   9
076   -
077   X=Y?      44 = R2?
078   GTO 9
079   3
080   -
081   X=Y?      41 = R2?
082   GTO 9
083   RTN
084  *LBL 9
085   1
086   RTN

```

## Register Use

```R1  Used
R2  Used
I   K
```