*> * Filename: DSPADJ.EVM * Written by: Tom V. J. Maglione * Written on: Monday 3-October-1988, 19:16 * This file is used to adjust R1, R2, C2 and C3 on the COCO DSP boards. AORG >0 *Start assembly at absolute location 0 in program memory B ST *Branch to startup code * The next section starts at absolute location 2 in program memory. * Note that interrupts are automatically disabled upon entry to this section. * This is the interrupt service routine: OUT >3,7 *Output fourth word to port 7 to reset watchdog timer. EINT *Enable interrupts. RET *Return from interrupt service. * The next section defines data word constants used in testing: D1 DATA >0000 *Define first data word. D2 DATA >0100 *Define second data word. D3 DATA >0300 *Define third data word. D4 DATA >005A *Define fourth data word, for resetting watchdog timer. * * The next section defines the startup and main routine code: ST DINT *Disable maskable interrupts. LARP 0 *Select auxiliary register 0 for indirect addressing. LDPK 0 *Select data memory page zero. LACK D1 *Get address of first program memory location to move. LARK 0,0 *Load AR0 with zero (data memory address 0). * At this point, ARP = 0, AR0 = 0, ACC = ADDR(D1): TBLR * *Load data mem. loc. 0 with contents of prog. mem. loc. D1. * MAR *+,0 *Increment aux. reg. 0 to 1. LACK D2 *Get address of second program memory location to move. TBLR * *Load data mem. loc. 1 with contents of prog. mem. loc. D2. * MAR *+,0 *Increment aux. reg. 0 to 2. LACK D3 *Get address of third program memory location to move. TBLR * *Load data mem. loc. 2 with contents of prog. mem. loc. D3. * MAR *+,0 *Increment aux. reg. 0 to 3. LACK D4 *Get address of fourth program memory location to move. TBLR * *Load data mem. loc. 3 with contents of prog. mem. loc. D4. * OUT >3,7 *Output fourth word to port 7 to reset watchdog timer. EINT *Enable maskable interrupts. * L1 OUT >0,5 *Output first word to port 5. OUT >1,5 *Output second word to port 5. OUT >2,5 *Output third word to port 5. OUT >0,5 *Output first word to port 5. B L1 *Loop forever. * END *<