; ; Simulation Version of Pass1; Instructions: ; ; 1. Set the SAMPLES constant variable to the number ; of samples you want to use. ; ; 2. Assume that your job folder is ; Z:\source\simfir ; ; This folder will contain the files ; ; asm563000.exe ; asm.bat [asm56300 -a -b -g -l simio.asm] ; simio.cld [assembler generated] ; simio.lst [assembler generated] ; mysrc.asm [your code, including subroutines ; my_init and my_job] ; inputL.io [ASCII text file, user supplied] ; inputR.io [ASCII text file, user supplied] ; outL.io [simulator generated] ; outR.io [simulator generated] ; and any other .asm files which are referenced ; by 'include's in mysrc ; ; EXAMPLE input file. If inputL.io contains ; [0.5 0.0#1000] ; then the left channel input will be 0.5 times ; a unit pulse sequence. (See Chapter 3 of the ; Simulator Manual) ; ; 3. in DOS, invoke the assembler by typing ; ; 4. start the simulator: ; ; start->programs->Motor..Tools->DSP563000->GUI56300 ; ; set the path < path Z:\source\simfir > ; load the object < load simio.cld > ; ; declare "radix fractional" input and output files: ; ; < input #1 x:0 inputL.io -rf > ; < input #2 x:1 inputR.io -rf > ; < output #1 x:2 outL.io -rf > ; < output #2 x:3 outR.io -rf > ; ; After running the simulator, close the I/O files ; before looking at them with another application: ; ; < input #1 off > ; < input #2 off > ; < output #1 off > ; < output #2 off > ; ; NOTE: In the following implementation, ; the memory locations x:$0 through x:$3 are ; reserved for I/O and cannot be used elsewhere. ; (These addresses can be changed by the user.) SAMPLES equ $14 ;decimal 20 org x:0 inL ds 1 ; input from x:$0 inR ds 1 outL ds 1 ; output to x:$2 outR ds 1 org p:0 jmp START org p:$400 START jsr sim_init ; init sim i/o jsr my_init ; user init code do #SAMPLES,ioLoop ; loop for SAMPLES times move x:inL,a ; load the sample from the file move x:inR,b jsr my_job ; user process sample code move a,x:outL ; write the sample to output move b,x:outR ioLoop stop sim_init clr a ; clear the four I/O locations move a,x:inL move a,x:inR move a,x:outL move a,x:outR rts include 'mysrc.asm' ; This file contains the user code end