Instruction manual

c,
SUMTEST: A Memory Test
Routine for the 6502
S.
Felton Mitchell, Jr.
c/o The Bit Stop
P.O.
Box
973
Mobile,
AL
36601
No microcomputer is better than
its
RAM
memory. Here
is a
RAM
memory test that can be adapted to any
6502
based system.
)
Figure 1
Figure 2
The program as currently assembl-
ed
uses KIM output routines. If your
machine is not a KIM (as mine is not),
then you will have to substitute your
system print routines. The print routines
are defined at the beginning
of
the
listing supplied.
The algorithm used
calculate~a
data byte
to
store each memory location
)
SUMTEST is a short
(107
byte)
machine lang.uage program to test
memory. The algorithm is not original
with
me,
as I have seen similar routines
published for the
8008, 8080, and 6800
microprocel!sors. I have not, however,
seen the SUMTEST algorithm used in a
6502 memory test routine.
SUMTEST will detect all
"stuck"
bits,
and will print the error address and the
offending
bit
pattern. SUMTEST
will
also
detect address sensitive errors, such as
the set of writing to hex location
0208
changing the contents of hex location
03BC. The sensitive address errors can
result from shortened address lines or
interaction
of
adjacent memory cells
within a memory chip. SUMTEST will not
detect byte sensitive memory failures
(except
by
accident).
The routine is assembled
to
reside
in the first part of page
01,
the stack
page for the
6502. The stack page is in-
tentionally used due to the fact that if
your
6502 machine is running, at least
the few bytes
of
page
01
used by the
December, 1979
stack are
"good."
The routine can
be
relocated elsewhere in memory
if
you
want
to
test the first part
of
page
01
where the routine resides. You
will
not
be
able
to
test the top few bytes
of
page
01
used as stack space by theprogram,
as any modification of the stack area
while the routine is running will result in
a program bomb.
SYMBOL
TABLE
3808 3096
BGNADH
8081
BGNADl
8088
CRlF
IE2F
ENDADH
8083
INCPTR
015B
INIT
8188
ONCE
0121
OUTCH
IEA0
RETURN
811C
RTN
816B
SUMUM
0153
TEST
8
183
Tl'IPY
0087
SYMBOL
TABLE
3000 3896
BGNADl
8088
BGNADH
8881
COUNTR
0084
Tl'IPADl
8885
INIT 8188
SUMTST
8180
lOOPB
8115
RETURN
811C
SETEl'I
014A
SUl'IUM
0153
RTN
816B
CRlF
IE2F
OUTCH
IEA8
MICRO
--
The 6502 Journal
CMPADl
0161
ENDADl
0082
lOOPA
0108
OUTSP
IE9E
SETEl'I
'H4A
Tl'IPADH
0086
ENDADl
8082
TI'IPADH
8086
TEST
0103
ONCE
0121
INCPTR
8156
PRTBYT
IE36
COUNTR
8084
ERROR
8126
lOOPB
8115
PRTBYT
IE3B
SUI'ITST
0100
TI'\PADl
11885
ENDADH
0083
TI'IPY
8087
lOOPA
0108
ERROR
8126
Cl'IPADl
11161
OUTSP
IE9E
19:73