-buf.put:\r
- push ix ;\r
- pop hl ; get buffer start address\r
-\r
- ld a,c ;\r
- ld c,(ix+o.in_idx) ; add input index\r
- ld b,0 ;\r
- add hl,bc ;\r
- ld (hl),a ; one place is allways free\r
- ld b,a ;\r
-\r
- ld a,c ; bump input index\r
- inc a ;\r
- and (ix+o.mask) ;\r
-bp.wait: ; do\r
- cp (ix+o.out_idx) ;\r
- jr z,bp.wait ; while new input idx == ouput idx\r
- ld (ix+o.in_idx),a ;\r
-\r