;Frank Nothaft, 2007 MACHINE MC68000 MAIN: movea.L #adc8address,A0 ;moves potentiometer ADC address to address register 0 movea.L #ramaddress,A1 ;moves address of 1st spot in RAM to address register 1 movea.L #lookup,A4 ;moves address of lookup table to address register 4 movea.L #adcaddress1,A2 ;moves address of 1st ADC to address register 2 movea.L #dacaddress,A5 ;moves address of DAC to address register 5 moveq.B #8,D0 1$ move.L (A0)+,(A1)+ ;gets data from potentiometer ADC and writes to RAM sub.B D0,#1 cmp.B D0,#0 beq 1$ ;branches when all 8 peices of data have been aqquired INT7: ;interrupt level 7 moveq.B D2,#8 move.L A1,A3 moveq.L D1,#0 sub.B #8,D0 sub.L D0,A1 3$ move.L (A2)+,(A4)+ ;moves data from ADC's to lookup table move.L (A1)+,(A4)+ ;moves potentiometer data from RAM to lookup table add.L (A4),D1 ;adds data from lookup table to running sum of values sub.L #2,(A4) sub.L D2,#1 cmp.B D0,#0 beq 2$ ;branches to 2$ when interrupt routine has gone through 8 times bra 3$ ;loops back to 3$ if all 8 data points have not been gotten 2$ move.L D1,(A5) ;moves sum of lookup table data to DAC jmp 1$ ;jumps back to main