+ endif\r
+\r
+;----------------------------------------------------------------------\r
+;\r
+; Put char in message buffer:\r
+; ix: buffer to put into\r
+; c: char\r
+\r
+buf.put:\r
+ push ix ;15\r
+ push bc ;11\r
+ ld a,(ix+o.in_idx) ;19\r
+ ld c,a ;4\r
+ ld b,0 ;7\r
+ add ix,bc ;11\r
+ pop bc ;10\r
+ ld (ix),c ;7\r
+ pop ix ;14\r
+\r
+ inc a ;4\r
+ and (ix+o.mask) ;19 =121\r
+bufp.wait:\r
+ cp (ix+o.out_idx) ;19\r
+ jr z,bufp.wait ;12/7\r
+ ld (ix+o.in_idx),a ;19\r
+\r
+ out (AVRINT5),a ;11\r
+ ld a,c ;4\r
+ ret ;10 =191\r
+\r