DECLARE SUB analogwr (chan%, dta%) 'DA_INT.BAS ' ' Analog Output Routines for the SBC1190 with 4 Channel D/A option ' ' This example uses the special Micro/sys system interrupt to ' write to the onboard D/A convertor. ' ' ' The following command lines will compile and link this program ' ' BC DA_INT.BAS /o; ' LINK DA_INT QB.LIB; ' ' 8/3/98 '$INCLUDE: 'qb.bi' forever: FOR n% = 0 TO &H1000 analogwr 0%, n% analogwr 1%, n% analogwr 2%, n% analogwr 3%, n% NEXT GOTO forever SUB analogwr (chan%, dta%) ' This function writes to an analog output given a channel ' number of 0 to 3 DIM InRegs AS RegType, OutRegs AS RegType InRegs.ax = &H4D30 'Micro/sys system function, write to DAC InRegs.bx = chan% InRegs.cx = dta% CALL INTERRUPT(&H1A, InRegs, OutRegs) END SUB