| Routines

37675: Calculate the attribute file address for a piano key

Used by the routine at 37596. Returns with the attribute file address in HL.
Input
A | Frequency parameter from the tune data table at 33902
37675 | SUB 8 | Compute the piano key index (K) based on the frequency parameter (F), and store it in bits 0-4 of A: K=31-INT((F-8)/8)
37677 | RRCA
37678 | RRCA
37679 | RRCA
37680 | CPL
37681 | OR 224 | A=224+K; this is the LSB
37683 | LD L,A | Set HL to the attribute file address for the piano key
37684 | LD H,89
37686 | RET |