9-25
WAVEFORM GENERATOR
and temp,#0001h ;mask
shl temp,#3 ;shift to correct location
ld temp1,it ;interrupt type bit
and temp1,#0001h ;mask
shl temp1,#2 ;shift to correct location
or temp,temp1 ;combine into temp
ld temp1,dp ;disable protection bit
and temp1,#0001h ;mask
shl temp1,#1 ;shift to correct location
or temp,temp1 ;combine into temp
ld temp1,eo ;enable output bit
and temp1,#0001h ;mask
or temp,temp1 ;combine into temp
stb temp,WG_PROTECT[0];store byte into WG_PROTECT
ret
;
;*******************************************
;interrupt routine for WFG
;*******************************************
;
cseg at 0f1a0h ;demo board PI interrupt
pusha
call wgout ;update WG_OUTPUT register
call loadregs ;update reload & compare regs
call protect ;update protection options
call wgcon ;update WG_CONTROL
popa
ret
end