Using the SSG sound channels

.org $8 push af	ld  a, d	out  (4), a	        ;Set YM2610 "Port A" register D to value E 	ld   a, e	out  (5), a	pop af

FastBeep: ld de, 0040h	       ;Channel A frequency = 2kHz rst 08h ld de, 0100h rst 08h

ld de, 0B0Fh		;EG frequency rst 08h ld de, 0C05h rst 08h

ld de, 0708h		;Noise off rst 08h ld de, 0810h		;Mode 1 for channel A	rst 08h ld de, 0D08h		;Ramp shape rst 08h ret

SSG_Silence: ld de, 0800h		;Channel A volume = 0 rst 08h ld de, 0900h		;Channel B volume = 0 rst 08h ld de, 0A00h		;Channel C volume = 0 rst 08h ld de, 070Fh		;Disable all channels rst 08h ret