APPENDIX

BENCHMARK: Block Move

PROCESSOR: Motorola 6809

;REGISTER USAGE

D - Block Length

X - Temporary Storage

Y - Source Pointer

U - Destination Pointer

Bytes

Cycles

 

 

 

 

 

 

 

4

4

LDY

#FROM

 

;Initialize

Source Pointer

3

3

LDU

#TO

 

 

;Initialize

Destination Pointer

3

3

LDD

#LENGTH

:Initialize

Block Length

1

2

INCB

 

 

 

 

 

 

2

3

BNC

SHIFT

 

;Add one to avoid losing a

1

2

INCA

 

 

 

; byte if LENGTH is odd

1

2 SHIFT

LSRA

 

 

 

;Adjust LENGTH for word

1

2

RORB

,Y++

 

; moves

 

2

8 MOVE

LDX

 

;Read word

 

2

8

STX

,U++

 

;Store word

 

1

2

DECB

MOvE

 

;LS

Count

 

2

3

BNE

 

 

 

 

1

2

DECA

MOvE

 

;MS

Count

 

2

3

BNE

 

 

 

 

 

 

26

bytes

of

code

 

 

 

 

 

14

1ines

of

code

 

 

 

33

AFN 01532A

Page 302
Image 302
Intel 210200-002 manual Register Usage