Prev: 13B4 Up: Map Next: 14A2
1481: store_hamming_nibble: Read the four data bits from hamming coded byte into address in HL
Used by the routine at init_hamming_table.
store_hamming_nibble 1481 LD A,(hamming_table_counter) Load hamming_table_counter into A and set B to zero.
1484 LD B,$00
1486 BIT 1,A If bit 1 of hamming_table_counter is set, set bit 0 of B.
1488 JR Z,store_hamming_nibble_0
148A INC B
store_hamming_nibble_0 148B BIT 3,A Else if bit 3 of hamming_table_counter is set, set bit 1 of B.
148D JR Z,store_hamming_nibble_1
148F SET 1,B
store_hamming_nibble_1 1491 BIT 5,A Else if bit 5 of hamming_table_counter is set, set bit 2 of B.
1493 JR Z,store_hamming_nibble_2
1495 SET 2,B
store_hamming_nibble_2 1497 BIT 7,A Else if bit 7 of hamming_table_counter is set, set bit 3 of B.
1499 JR Z,store_hamming_nibble_3
149B SET 3,B
store_hamming_nibble_3 149D LD A,B Store B at address in HL and return.
149E AND $0F
14A0 LD (HL),A
14A1 RET
Prev: 13B4 Up: Map Next: 14A2