User`s manual

Symbolic Debugging in Assembly Code
Motorola Debugging C and Assembly Code 3-21
rep #data_points
move x0,x:(r6)+ ;clear data points
.loop
do #data_points,end_fir ;one loop for each tap
IODATA input_data,1,1,Y_MEM,data_in ;read data from ADS
move y:data_in,x0 ;get sample
jsr fir_filter
move a,y:data_out ;output sample
IODATA output_data,1,1,Y_MEM,data_out ;write data to ADS
move a,x:(r6)+ ;save data
end_fir
.endl
fir_filter
clr a x0,x:(r1)+ y:(r5)+,y0 ;save first state
rep #num_taps-1
mac x0,y0,a x:(r1)+,x0 y:(r5)+,y0
macr x0,y0,a (r1)-
rts
endsec
end
Example 3 -6. A Header File for the FIR Example: iodata.h
IODATA macro label,filenumber,count,memoryspace,address
move x0, y:(r7)+ ; save register in y data
move r0, y:(r7)+
move r1, y:(r7)+
move #>((?filenumber<<8)|count),x0 ;(file# << 8) | count
move #>?address,r0 ;address
move #>memoryspace,r1 ;memory space
label debug
move y:-(r7), r1 ; restore register
move y:-(r7), r0
move y:-(r7), x0
ENDM
Note that in Example 3 -6, the “?” symbol used in the move commands( i.e. move #>?address,r0) is a
special macro substitution syntax.