Instruction manual

Listing 1
o
POKEl3:;,
10:
POKEl24,
216:
POK£125,
006:
CLH: GOSUB100
1
SYS273C1:GITA/i:
IFAli=""THEIn
2.IFAli="
"T'rlElliNPUTMi:SYS2691:GOTOl
3
IF
A;J="
E'''!'lIE?iPOKEl3
5,32:
FOKE124
,
131:
POKEl2
5,11
:
END
4
EA/i="S"THINOX=0:0Y=0
5 A=VAL( Ali) :CX=OX+OX(
A)
:OY=OY+OY(
A)
6 IFOX>2CTHENOX=20
7
IFOX<-20THENOX=-20
8 IFO Y>18 THENOY=18
9
IFOY<-lSTHEIiOY=-18
10
P=4
533+0X+OY*80:
FH= H1T( P
/256)
:
PL=P-FH*
2 5
6:
POKE2940,
FL:
POKE2941,
PH
11
POKE515,255:GOTOl
100
H1IllT"chcdcdcd
***
LIFE
60X80
***
cdcdcdcdcdcd
101
FOKE2940,181:POKI2941,17
102
FOhA=OT09:READOX(A)
,OY(
A)
:
NEXT
104
P,'lINT"cdcdcdPUT
THE CELLS WITH
'.'
ON
THE SCREEN.
106
BINT"cdSTP8T
'!lITH
'RET.',
STOP
WITH
'SPACE'.
107
FilIN'T"cdEND
WITH
'E':
108
PRINT"
cdMOVE THE ',lINDO':!
WITH
1
~O
'9
cdTHE
5 CENTERS
IT.
109
PRIilT"cdcdcdrvsPRESS
AI1Y
KEY.
110
GE'i'Aii:IFA;;=""GOT0110
111
PR
INT"
chcdcdcdcdcdcdcdcdcd"
: INPU'TM3:
SYS2688:
RETURN
120
DATAO,0,2,-2,0,-2,-2,-2,2,0,0,0,-2,0,2,2,O,2,-2,2
cd
=
Cursor
down
ch
=
Clear-Horne
rvs
=
Reverse
comes from bit 5
into
bit
7.
Since there
does not exist an indirect addressing for
the ASL command, I had to use the ab-
solute indexed
to
increment the argu-
ment directly. Finally, TSCR
throws
the
cells on the screen
with
51
's
if
bit 7 is set
and 20's (blanks) else. The
RTS
returns
the control back to BASIC. For one
generation the programs needs about
1/2
second. The speed may be slowed
down
by a waiting loop in BASIC.
Combining BASIC
and
Machine Code
If
you have entered the
machine
code, type in NEW (but
don't
switch
off)
and
enter
the BASIC code. If you have
finished, find
out
the actual values of the
"end
of BASIC" pointer in dec
124
and
125
by PEEK commands.
If
they
differ
from
215
resp.5, the pokes in line 0
must
be
changed. Before a run,
this
POKE
must
contain
the actual value of the
pointer,
after
the last change in the
BASIC program.
To save everything on tape enter:
POKE
124, 130:
POKE
125,
11:
CLR and
then SAVE
"LIFE
60
4
80".
With
the POKE,
the
"end
of BASIC" pointer is raised
beyond the end
of
the machine code and
thus
with
the save, both program
parts
are combined. When running the pro-
gram, line 0 restores the old values of
the pointer. The program can
be
loaded
and run like any other program. Only
if
changes are made in BASIC, line 0 must
be
updated.
OA80
20
57
OB
FS
OA83
20
4C
OB
NE
OAS6
A9
34
OA88
8D
11
E8
OA8t
A2
18
OA8D
AO
27
LPl
OA8F
B1
3D
LP2
OA91
C9
51
OA93
DO
04
OA95
A9
80
OA97
DO
02
OA99
A9
00
OA9B
91
3B
OA9D
88
OA9E
10
EF
OAAO
20
34
OB
OAA3
10
E8
OAM
A9
3C
OAA7
8D
11
E8
OAAA
78
START
OAAB
20
4C
OB
OAAE
A2
01
LP3
OABO
Bl
29
OAB2
10
01
OAB4
CA
OAB5
Bl
2B
OAB7
10
01
OAB9
CA
OABA
B1
2D
OABC
10
01
OABE
CA
OABF
B1
2F
OACl
10
01
OAC3
CA
19:46
Listing 2
JSR
CLEAR
OAC4
Bl
31
JSR
INIT
OAC6
10
01
LDA=34
OAC8
CA
STA E1311
OAC9
Bl
33
LDX=18
OACB
10
01
LDY=27
OACD
CA
LDA
(PS),Y
OACE
B1
35
CMP=51
OADO
10
01
BNE
04
OAD2
CA
LDA=80
OAD3
Bl
37
BNE
02
OAD5
10
01
LDA=OO
OAD7
CA
STA
(PA),
Y
OADS
8A
DEY
OADg
10
10
BPL
LP2
OADB
C9
FE
JSR
INPDEX
OADD
FO
06
BPL
LPI
OADF
30
OA
LDA=3C
OAEl
Bl
39
STA ES11
OAE3
10
06
8EI
OAE5
A9
40
JSR
INIT
OAE7
11
39
LDX=1
OAE9
91
39
LDA
(PI)
,Y
OAEB
88
BPL
01
OAEC
DO
CO
DEX
OAEE
A2
12
LDA
(P2)
, Y
OAFO
F6
28·
BPL
01
OAF2
CA
DEX
OAF3
CA
LDA
(P3),
Y
OAF4
DO
FA
BPL
01
OAF6
C6
3F
DEX
OAF8
10
B4
LDA
(P4)
,Y
OAFA
A9
12
BPL
01
OAFC
85
3F
DEX
MICRO
--
The 6502 Journal
LBN
TOD
INPTS
LP4
RESTR
LDA
(P5),Y
BPL
01
DEX
LDA
(P6),Y
BPL
01
DEX
LDA
(P7),Y
BPL
01
DEX
LDA
(p8)
, Y
BPL
01
DEX
TXA
BPL
TOD
cr,1P=FE
BEQ LBN
BlAI
TOD
LDA
(P9),
Y
BPL
TOD
LDA=40
ORA
(P9)
,Y
STA(P9),Y
DEY
BNE
LP3
LDX=12
INC
TBL-l,X
DEX
DEX
BNE
LP4
DEC
CNT
BPL
LP3
LDA=12
STA
CNT
December, 1979