home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ZSYS / SIMTEL20 / SYSLIB / SLIB3.LBR / SPFN1.Z80 < prev    next >
Text File  |  2000-06-30  |  640b  |  39 lines

  1. ;
  2. ; SYSLIB Module Name:  SPFN1
  3. ; Author:  Richard Conn
  4. ; SYSLIB Version Number:  3.6
  5. ; Module Version Number:  1.1
  6.  
  7.     public    pfn1
  8.  
  9.     ext    cout
  10.  
  11. ;
  12. ;  Print FCB file name and type pted to by DE on CON:
  13. ;  Format of Output:  xxxxxxxx.xxx
  14. ;
  15. pfn1:
  16.     push    de    ; save regs
  17.     push    bc
  18.     push    af
  19.     ld    b,8    ; 8 chars first
  20.     call    prfnx
  21.     ld    a,'.'    ; dot
  22.     call    cout
  23.     ld    b,3    ; 3 more chars
  24.     call    prfnx
  25.     pop    af    ; restore regs
  26.     pop    bc
  27.     pop    de
  28.     ret
  29. prfnx:
  30.     ld    a,(de)    ; get char
  31.     and    7fh    ; mask out msb
  32.     call    cout    ; print it
  33.     inc    de    ; pt to next
  34.     dec    b    ; count down
  35.     jp    nz,prfnx
  36.     ret
  37.  
  38.     end
  39.