.ARMS_off ;enable assembler for ARMS=0 .CPL_on ;enable assembler for CPL=1 .mmregs ;enable mem mapped register names .global _bit_rev_data .global _fft_data .global _window .global _bit_rev .copy "macro.asm" .sect ".data" N .set 1024 K_FFT_SIZE .set 1024 .align 4*N _bit_rev_data .space 16*2*N ; Output of bit reversing function .align 4*N _fft_data .space 16*2*N ; FFT output buffer .sect ".text" _bit_rev ENTER_ASM MOV #_fft_data, AR3 MOV #_bit_rev_data, AR7 MOV AR7, AR2 MOV #K_FFT_SIZE-1, BRC0 MOV #K_FFT_SIZE, T0 RPTB bit_rev_end-1 MOV dbl(*AR3), AC0 MOV AC0, dbl(*AR2+) AMAR *(AR3+T0B) bit_rev_end: LEAVE_ASM RET ; If you need any more assembly subroutines, make sure you name them ; _name, and include a ".global _name" directive at the top. Also, ; don't forget to use ENTER_ASM at the beginning, and LEAVE_ASM ; and RET at the end!