ok, i found a sound routine in the old sos lib, but i don't understand how it works with the frequency. this code beeps until you press enter, but how does it know what frequency?
start:
ld c,69 ;c is the frequency
ld b,255 ;b is the duration
beep: di ;disable interrupts
ld e,$D0
beepl1: ld a,c
beepl2: dec a
jr nz,beepl2
ld a,e
xor %00000011
ld e,a
out (0),a
djnz beepl1
ei
bcall(_getk)
jp z,start
ret
.end
END