;************************************************************************** ; ; Filename: dsp_wn.asm ; ; Author: Ronald Bazillion ; ; Module Description: ; ; This module transmits white noise to the speaker. ; ; ;************************************************************************** include 'init.asm' include 'w_noise.asm' org p: MAIN jsr RNG_INIT ;Initialize the White Noise Generator loop wait_frame ;Macro call to wait for RX frame. ;This call waits for the initial ;frame sync and then waits for the following ;frame sync thus allowing the data frame ;to be received. get_left_channel ;get left channel data. Data is in x0 get_right_channel ;get right channel data. data is in y0 jsr RNG ;generate white noise. sample in a1 move a1,b1 ;place white noise sample in left channel transmit_left_channel ;Transmit left channel data. Data to be ;transmitted is in accumulator a. transmit_right_channel ;Transmit right channel data. Data to be ;transmitted is in accumulator b. jmp loop