6 - 43
Examples
6.16. Code converters
6.16.1. 8bit BCD-to-binary converter
BM00.00
BCD
binary
BM00.01
8bit BCD-
to-binary
converter
Program
L
BM00.00
;load BCD value
LSR
;shift
LSR
;tens
LSR
;to
LSR
;units
MUL
10
;multiply
=
BM00.01
;store temporarily
L
BM00.00
;load BCD value
A
%00001111 ;mask tens
ADD
BM00.01
;add binary tens
=
BM00.01
;store binary value
BCD:
8bit
0-99
BM00.00
binary:
8bit
0-99 ($63)BM00.01
Summary of Contents for KUAX 680C
Page 10: ...Contents 8 Table of contents...
Page 12: ...1 2 Introduction...
Page 90: ...4 36 Description of the commands...
Page 99: ...4 45 Software 4 7 10 Module hierarchy example for different module calls...
Page 102: ...5 2 Networking...
Page 132: ...6 30 Examples...
Page 160: ...A 4 Appendix...
Page 164: ...C 2 Appendix...
Page 180: ...Index 6 Index...