home *** CD-ROM | disk | FTP | other *** search
- extrn .advptr, .inxm
- ;
- ; put byte c to buffer hl^. No range checks
- ; a,f
- .bput:: push h ! push d ! push b
- inx h ! inx h; adv to size store
- mov c,m ! inx h ! mov b,m; get size
- inx h ! inx h ! inx h; point to ctr field
- call .inxm ! inx h; and decrement
- inx h ! inx h; advance to write ptr
- mov e,m ! inx h ! mov d,m; get read ptr
- push d; save, before advance
- call .advptr; advance modulo bc
- mov m,d ! dcx h ! mov m,e; and save
- pop d
- inx h ! inx h; advance to buff base
- pop b
- dad d ! mov m,c; index and put char. clr cy.
- pop d ! pop h
- ret
- ù