BENCHMARK:
Character Search
PROCESSOR:
Motorola
6809
Bytes
Cycles
3 3
-LOX
2 2
LOA
2 2
LOB
2 6
AGAIN
CMPA
2 3
BEQ
1
2
OECB
2 3
BNE
3 3
LOX
2 5
PASTPTR
LEAX
APPENDIX
;REGISTER
USAGE:
#PTR
#CHAR
#40
,X+
A -
ACCUMULATOR
B -
COUNT
X -
TABLE
POINTER
;Initialize
Table Pointer
;Search character
;Initialize
count
;
Compare
, autoincrement
PASTPTR
;Jump
if
found
;
Decrement
count
AGAIN
;00 again unless
B=O
#1
;Not
found: X will return 0
- 1, X
;Adj
ust X
19
bytes of
code
9 lines of
code
36
AFN 01532A