ld hl, sineTable ; Get address of table xor a ld d, a ; Set index high byte to zero ld a, (frame_count) ld e, a ; Set index low byte add hl, de ; Add offset to base ld a, (hl) ; Look up value