#inc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; This program reads from two neighbour ADCs and stores in GIO ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; IRQ_TST for CPU3 ; CON[ 8] is the ADC address in local IO ; CON[ 9] is the GIO start address to store the data ; CON[12] number of samples tst: ; load the LIO address in r12 mov c8, r12; mov c8, r13; add r13, c1, r13 ; the next address in LIO ; load the start address of IMEM in GIO mov c9, r14; ; calc the end address add r14, c12, r15; add r15, c1, r15; -- end address + 1 ; enable the interrupts sti wait: cmp r14, r15; jmp cc_ltu, wait; -- PRF[14] < PRF[15] ; disable the interrupts cli mov r14, r2 iext 0xF000 mov 0xF000, r14 nop ; some debug data sgio+ r2; jmpr cc_busy, 0 ; write CPU id mov c5, r7; sgio+ r7; mov 0x012, r1; jmpr cc_busy, 0 sgio r1, SMCMD; power off jmpr cc_uncond, 0 nop ; -- IRQ EOC for CPU1 ORG 0x30; ; ; read the ADC value eoc: lpio r12,r5; lpio r13,r5; lpio r13,r6; shl 12, r5, r5; ; combine the two samples or r5, r6, r6; ; store in some IMEM sgio+ r6; irt; nop;