Examples 6.16.2 Binary-to-BCD converter, 8-bit Binary: 8-bit 0-99($63) BM00.00 BCD: 8-bit 0-99 BM00.01 Bin BCD binary-to-BCD converter Program L BM00.00 ;load binary value DIV 10 ;find and = LBM00.00 ;store tens MUL 10 ;calculate and register = LBM00.01 ;integer amount of tens L BM00.00 ; SUB LBM00.01 ;find and = LBM00.01 ;store tens L LBM00.00 ;shift LSL ;tens LSL ;into the upper LSL ;nibble LSL ; O LBM00.01 ;compress and = BM00.01 ;output BCD value 141