home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / EXTRA-ST / CPM-80-E / CPM-0.2 / CPM-0 / cpm-0.2 / z80-sources / mylib / fileprnt.mac < prev    next >
Encoding:
Text File  |  1994-06-06  |  768 b   |  30 lines

  1. ;************************************************************************
  2. ;*        FILEOUT prints Filename.                *
  3. ;*        upon call, HL must point to FCB                *
  4. ;************************************************************************
  5.  
  6.         .z80            ;
  7.         entry _fileout        ;
  8.  
  9. _fileout:    ld a,(hl)        ; lfw: specified?
  10.         or a            ;
  11.         jr z,file01        ;
  12.         add a,'@'        ;
  13.         call stdout##        ;
  14.         ld a,':'        ;
  15.         call stdout##        ;
  16. file01:        ld b,8            ; name
  17. file02:        inc hl            ;
  18.         ld a,(hl)        ;
  19.         call stdout##        ;
  20.         djnz file02        ;
  21.         ld a,'.'        ; delimiter
  22.         call stdout##        ;
  23.         ld b,3            ;
  24. file03:        inc hl            ;
  25.         ld a,(hl)        ;
  26.         call stdout##        ;
  27.         djnz file03        ;
  28.         ret            ; B=0, HL+=12, rest blieb
  29.         end            ;
  30.