home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / asmutl / asmlib.lbr / PCOUNT.AZM / PCOUNT.ASM
Assembly Source File  |  1991-06-25  |  768b  |  39 lines

  1. ;----------------------------------------------------------------
  2. ;        This is a module in the ASMLIB library
  3. ;
  4. ;         Print a string for (b) bytes
  5. ;
  6. ;            Written         R.C.H.     16/8/83
  7. ;            Last Update    R.C.H.       22/10/83
  8. ;----------------------------------------------------------------
  9. ;
  10.     name    'pcount'
  11. ;
  12.     public    pcount
  13.     extrn    dispatch
  14.     maclib    z80
  15. ;
  16. pcount:
  17.     push    psw
  18.     mov    a,b
  19.     ora    a
  20.     jrz    pcount3
  21.     push    b
  22.     push    d
  23. pcount2:
  24.     ldax    d            ; fetch ascii character
  25.     call    dispatch        ; print it
  26.     inx    d            ; increment memory reference
  27.     djnz    pcount2            ; decrement counter
  28. ;
  29.     pop    d
  30.     pop    b
  31. pcount3:
  32.     pop    psw
  33.  
  34. ;
  35.     ret
  36.  
  37.     end
  38.  
  39.