+ mov @r1,a ; save it
+ inc r1
+ djnz r0,nextDAlo ; next channel
+ ret
+
+
+;;; write to the DA converter
+DAsend:
+ mov r1,#DABUFFER ; buffer of the DA values
+ mov a,@r1 ; get the channel count
+ jz DAret ; nothing to do
+ inc r1 ; pointer to the first byte
+ mov r0,a ; counter
+nextDA:
+ mov a,@r1 ; get the byte
+ inc r1 ; point to the high byte
+ mov r3,a ; store in r3 for writeDA
+ mov a,@r1 ; get the channel number
+ inc r1 ; get ready for the next channel
+ push 1 ; is modified in the subroutine