Sunteți pe pagina 1din 6

SHOOTING STARS PUZZLE GAME for MC6800/MIKBUG

by Random73
May 16, 2015

This puzzle game was featured in the May 1976 issue of BYTE
magazine. It was written for the Intel 8008 microcomputer. That
same summer I re-wrote it for the MC6800 so that I could run it
in my Motorola MEK6800D1 evaluation kit, which had only 640
bytes of user memory. My version of SHOOTING STARS occupies
memory locations $0000 to $0243 (580 bytes).
The program starting address is $0100. The star positions are
numbered from 1 to 9. The game starts with a star at 5 and black
holes everywhere else. You have to shoot 5 first;
1

6 --------> .

Shooting 2,4,6, or 8 turns that star into a black hole, and the
two vertically (1 and 7 for 4, or 3 and 9 for 6) or horizontally
(1 and 3 for 2, or 7 and 9 for 8) adjacent positions flip state,
i.e., holes become stars, and stars become holes. You can only
shoot stars.

Shooting 1 flips 1,2,4,and 5. Shooting 3 flips 2,3,5, and 6, and


so on for 7 and 9.
The goal is to have all stars around the periphery and a hole in
the middle;

---Last Shot--->

---> You Win!

When it asks Your Shot? You can type S to stop playing. You
can then type N or Y to confirm stop, or to play again. The
minimum number of shots to win is 11. The game will report how
many valid shots you made, when you win.
My original source program printout disappeared years ago, but
in the summer of 1976 it was published across two issues of the
newsletter of The Atlanta Area Microcomputer Hobbyists Club,
which I still have. I recently captured my original source
program by retyping it into MS Notepad from the newsletters. I
then ran the Resident Assembler MP-E to create a new source
program listing and object code file.
SHOOTING STARS REASSEMBLED MAY 16, 2015
COPY AND PASTE THIS OBJECT CODE LISTING INTO YOUR 6800 CONSOLE WINDOW AFTER TYPING THE
MIKBUG "L" COMMAND. AT THE "*" PROMPT TYPE "G" AND YOU'RE OFF TO THE RACES. I INSERTED
THE 1ST LINE BELOW TO SET PC=0100 DURING THIS LOAD, AS A CONVENIENCE.
S105A048010011
S11E000353484F4F542053544152532C204E4F5420484F4C455304494E56419A
S11E001E4C49442053544152204E554D42455204594F55204C4F5354210D0A0C
S11E0039504C415920414741494E3F04594F552057494E210D0A594F55204609
S11E00544952454420042053484F54532E0D0A4245535420504F535349424CE5
S11E006F452053434F52452049532031312053484F54532E0D0A504C41592007
S11E008A414741494E3F040D0A0A2020202004474956454E20555020414C52D2
S11E00A5454144593F0D0A57414E5420544F20504C415920414741494E3F04AD
S11E00C0594F55522053484F543F20040D0A0A20532048204F204F205420495A
S11800DB204E20472020205320542041205220530D0A0A043075
S11E022031010BFF32020700330416FF3408290035005AFF3610940037206870
S10C023BFF3840E0003980D0FFD7
S11E0100CE00CCBDE07E4F970043970197027C0002C60A96005A26037E01B932
S11E011BC109270CC1062708C105271EC1032605CE00918D5BCE00958D564605
S11E0136362508862EBDE0753220D4862A20F636CE00958D4096014620E7CE7D
S11E015100C08D36BDE078CE00EB8D2EC609CE0220A10027095A27300808082A
S11E016C0820F3A6012606D601271A2004940027149600A80297009601A80362
S11E01879701208336BDE07E3239CE00038DF57E011181532607CE00998DE9A1
S11E01A22068CE001A8DE220EB4D26A29601269ECE002E8DD42053CE00EB8DCE
S11E01BDCD960081FF26E796012B88CE00458DBED6EFD700D701863ACE000089
S11E01D85C112610D6EF6C01910126083696EF9701326C006A0226E8960091E1
S11E01F3EF2703BDE075960191EF2703BDE07517BDE075CE005ABD018BBDE038
S114020E78815926037E0106CE0100FFA0487EE0E3E4
S9

--PAGE

00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054

001

SHOOTING

STARS

NAM
OPT

A048
E07E
E075
E078
E0E3
0000
0000
0001
0002
0003
0019
001A
002D
002E
0037
0039
0044
0045
004D
004F
0059
005A
0061
0063
0083
0085
0090
0091
0095
0099
00AA
00AC
00BF
00C0
00CB
00CC
00CF
00EB
00EF
0220
0220
0224
0228
022C
0230
0234
0238

0001
0001
0001
53
04
49
04
59
0D
50
04
59
0D
59
04
20
0D
42
0D
50
04
0D
20
47
0D
57
04
59
04
0D
20
0D
30
31
32
33
34
35
36
37

*
*
*
*
*
PRGCTR
PDATA1
OUTCH
INCH
CONTRL

SHOOTING STARS
O,S,NOG

S H O O T I N G
BY DONALD R. SENTZ

S T A R S

EQU
EQU
EQU
EQU
EQU
ORG
BB
RMB
C
RMB
D
RMB
MONE
FCC
FCB
MTWO
FCC
FCB
MTHR
FCC
FCB
FCC
FCB
MFOR
FCC
FCB
FCC
FCB
MFIV
FCC
FCB
FCC
FCB
FCC
FCB
CLFSP4 FCB
SP3
FCB
MSIX
FCC
FCB
FCC
FCB
MSVN
FCC
FCB
HMESS FCB
FCC
LF2
FCB
ASCII0 FCB
ORG
TABLE FCB
FCB
FCB
FCB
FCB
FCB
FCB

JUNE,1976

$A048
$E07E
$E075
$E078
$E0E3
$0000
1
1
1
/SHOOT STARS, NOT HOLES/
$04
/INVALID STAR NUMBER/
$04
/YOU LOST!/
$0D,$0A
/PLAY AGAIN?/
$04
/YOU WIN!/
$0D,$0A
/YOU FIRED /
$04
/ SHOTS./
$0D,$0A
/BEST POSSIBLE SCORE IS 11 SHOTS./
$0D,$0A
/PLAY AGAIN?/
$04
$0D,$0A,$0A,$20
$20,$20,$20,$04
/GIVEN UP ALREADY?/
$0D,$0A
/WANT TO PLAY AGAIN?/
$04
/YOUR SHOT? /
$04
$0D,$0A,$0A
/ S H O O T I N G
S T A R S/
$0D,$0A,$0A,$04
$30
$0220
$31,1,11,$FF
$32,2,7,0
$33,4,@026,$FF
$34,8,@051,0
$35,0,@132,$FF
$36,16,@224,0
$37,32,@150,$FF

--PAGE

002

SHOOTING

STARS

00055 023C 38
00056 0240 39
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108

0100
0100
0103
0106
0107
0109
010A
010C
010E
0111
0113
0115
0116
0118
011B
011D
011F
0121
0123
0125
0127
0129
012B
012E
0130
0133
0135
0136
0137
0139
013B
013E
013F
0141
0143
0145
0146
0149
014B
014D
014E
0150
0153
0155
0158
015B
015D
015F
0162
0164
0166

CE
BD
4F
97
43
97
97
7C
C6
96
5A
26
7E
C1
27
C1
27
C1
27
C1
26
CE
8D
CE
8D
46
36
25
86
BD
32
20
86
20
36
CE
8D
96
46
20
CE
8D
BD
CE
8D
C6
CE
A1
27
5A

00CC
E07E
START
00
01
02
0002 CNTSHT
0A
PRUNIV
00
LPTST
03
01B9
09
CNTLP
0C
06
08
05
1E
03
05
0091 CLFS4
5B
0095 CONT
56
08
STRTST
2E
E075 STROUT
D4
2A
F6

ASTOUT
POS5

0095
40
01
E7
00C0 NXTSTR
36
E078
00EB
2E
09
0220
00
NEXGRP
09

FCB
FCB

$38,64,@340,0
$39,128,@320,$FF

ORG
LDX
JSR
CLR
STA
COM
STA
STA
INC
LDA
LDA
DEC
BNE
JMP
CMP
BEQ
CMP
BEQ
CMP
BEQ
CMP
BNE
LDX
BSR
LDX
BSR
ROR
PSH
BCS
LDA
JSR
PUL
BRA
LDA
BRA
PSH
LDX
BSR
LDA
ROR
BRA
LDX
BSR
JSR
LDX
BSR
LDA
LDX
CMP
BEQ
DEC

$0100
#HMESS
PDATA1
A
A
A
A
A
B
A
B
B
B
B
B

INITIALIZE UNIVERSE
BB
C
D
D
#10
BB
CNTLP
WINTST
#9
CLFS4
#6
CLFS4
#5
POS5
#3
CONT
#CLFSP4
PDATA
#SP3
PDATA

A
A
A

STARTING ADDRESS
PRINT TITLE

COUNT VALID SHOTS


PRINT CURRENT STATE OF
UNIVERSE
DONE PRINTING UNIVERSE?
YES, GO TEST FOR WIN OR LOSS
NO, CONTINUE PRINTING

CHECK WHETHER TO PRINT STAR


OR HOLE.
ASTOUT
#'.
OUTCH

IT WAS A BLACK HOLE

LPTST
#'*
STROUT

IT WAS A STAR.

A
A
A
A
A

B
A
B

SAVE ROTATED UNIVERSE.


#SP3
PDATA
C
STRTST
#MSVN
PDATA
INCH
#LF2
PDATA
#9
#TABLE
0,X
FOUND

INFO ON STAR 5 IS IN C.
GO TEST STAR 5
GET NEXT SHOT

TABLE DRIVER TO GET MASK


LOCATED MASK YET?
NO, NOT YET.

--PAGE

003

00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162

0167
0169
016A
016B
016C
016D
016F
0171
0173
0175
0177
0179
017B
017D
017F
0181
0183
0185
0187
0189
018B
018C
018F
0190
0191
0194
0196
0199
019B
019D
01A0
01A2
01A4
01A7
01A9
01AB
01AC
01AE
01B0
01B2
01B5
01B7
01B9
01BC
01BE
01C0
01C2
01C4
01C6
01C8
01CB
01CD
01CF
01D1

SHOOTING

27
08
08
08
08
20
A6
26
D6
27
20
94
27
96
A8
97
96
A8
97
20
36
BD
32
39
CE
8D
7E
81
26
CE
8D
20
CE
8D
20
4D
26
96
26
CE
8D
20
CE
8D
96
81
26
96
2B
CE
8D
D6
D7
D7

STARS

30

F3
01
06
01
1A
04
00
14
00
02
00
01
03
01
83

FOUND

UNIV2A
NEXBYT

PDATA
E07E
0003
F5
0111
53
07
0099
E9
68
001A
E2
EB

BADSHT
BRPRU
INVAL

NOTVAL

LOSTST
A2
01
9E
002E
D4
53
00EB WINTST
CD
00
FF
E7
01
88
0045
BE
EF
00
01

BEQ
INX
INX
INX
INX
BRA
LDA
BNE
LDA
BEQ
BRA
AND
BEQ
LDA
EOR
STA
LDA
EOR
STA
BRA
PSH
JSR
PUL
RTS
LDX
BSR
JMP
CMP
BNE
LDX
BSR
BRA
LDX
BSR
BRA
TST
BNE
LDA
BNE
LDX
BSR
BRA
LDX
BSR
LDA
CMP
BNE
LDA
BMI
LDX
BSR
LDA
STA
STA

INVAL

A
B
A
A
A
A
A
A
A

NEXGRP
1,X
UNIV2A
C
BADSHT
NEXBYT
BB
BADSHT
BB
2,X
BB
C
3,X
C
CNTSHT

YES, NOW GET POSITION MASK


WAS IT STAR 5?
YES, TEST FOR BLACK HOLE
IF 0, YOU GOOFED.
MASK OFF POSITION AND
TEST FOR BLACK HOLE.
SHOT VALID, UPDATE
UNIVERSE USING GALAXY
MASK AND STAR 5 MASK.

COUNT SHOT AS VALID.

A
PDATA1
A

#MONE
PDATA
PRUNIV
#$53
NOTVAL
#MSIX
PDATA
DOAGN
#MTWO
PDATA
BRPRU

A
A

A
A
A

B
B
B

NXTSTR
C
NXTSTR
#MTHR
PDATA
DOAGN
#LF2
PDATA
BB
#$FF
LOSTST
C
NXTSTR
#MFOR
PDATA
ASCII0
BB
C

WAS INPUT AN "S" ?


NO,INVALID CHARACTER.
YES, END GAME.

THEY WEREN'T ALL STARS


WERE THEY ALL HOLES?
YOU HAVEN'T WON YET.
ALL HOLES, SO YOU LOST.
OUTPUT FORMATTING
ARE ALL OUTER POSITIONS
STARS?
IF NOT, TEST FOR LOSS
CHECK FOR HOLE AT 5.
IF STAR, CONTINUE GAME.
YOU WON.
COMPUTE SCORE.

--PAGE

004

00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198

01D3
01D5
01D8
01D9
01DA
01DC
01DE
01E0
01E2
01E4
01E5
01E7
01E9
01EA
01EC
01EE
01F0
01F2
01F4
01F6
01F9
01FB
01FD
01FF
0202
0203
0206
0209
020C
020F
0211
0213
0216
0219
021C

SHOOTING

86
CE
5C
11
26
D6
6C
91
26
36
96
97
32
6C
6A
26
96
91
27
BD
96
91
27
BD
17
BD
CE
BD
BD
81
26
7E
CE
FF
7E

3A
0000

STARS

LDA
LDX
COUNTR INC
CBA
10
BNE
EF
LDA
01
INC
01
CMP
08
BNE
PSH
EF
LDA
01
STA
PUL
00
INC
02
TALLY DEC
E8
BNE
00
LDA
EF
CMP
03
BEQ
E075
JSR
01
MIDPRT LDA
EF
CMP
03
BEQ
E075
JSR
LSTSIG TBA
E075
JSR
005A
LDX
018B
JSR
E078 DOAGN JSR
59
CMP
03
BNE
0106
JMP
0100 QUIT
LDX
A048
STX
E0E3
JMP
END

TOTAL ERRORS 00000

#$3A
#0

B
B
A
A
A
A
A

A
A
A
A

TALLY
ASCII0
C,X
C
TALLY
ASCII0
C
BB,X
D,X
COUNTR
BB
ASCII0
MIDPRT
OUTCH
C
ASCII0
LSTSIG
OUTCH
OUTCH
#MFIV
PDATA
INCH
#'Y
QUIT
START
#$0100
PRGCTR
CONTRL

SET UP FOR RESTART