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 / SMFN1.Z80 < prev    next >
Text File  |  2000-06-30  |  640b  |  39 lines

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