; THRU.ASM ; ; Example code which takes input samples and outputs them unmodified. ; This works at stereo with a 48kHz sampling rate. ; ; After the macro WAITDATA is finished, samples are mapped in ; memory as follows: ; ; ... (R3) (R3+1) (R3+2) (R3+3) ... ; ---------------- -------------- --------------- ----------------- ; Y: | XXXXXXXXXXXXXX | LEFT OUT (n) | RIGHT OUT (n) | XXXXXXXXXXXXXXX | ; ---------------- -------------- --------------- ----------------- ; X: | LEFT IN (n) | RIGHT IN (n) | XXXXXXXXXXXXX | XXXXXXXXXXXXXXX | ; ---------------- -------------- --------------- ----------------- ; ; XXX's represent CODEC control information that must not be changed. ; SAMPLERATE equ 48 nolist include 'core002.asm' list n_taps equ 3 ; number of filter taps org p:$100 main ; No other initialization required here. loop waitdata r3,buflen,1 move x:(r3)+,a ; Input left sample move a,x0 ; move into x0 ; ; Sample processing would be done here. ; move a,y:(r3)+ ; Output left sample move b,y:(r3)+ ; Output right sample move (r3)+ ; Must have four R3 increments jmp loop ;