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 / SSFN2.Z80 < prev    next >
Text File  |  2000-06-30  |  768b  |  41 lines

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