; TITLE "SLFN2 - Syslib 4.0" NAME ('LFN2') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SLFN2.Z80 by Richard Conn ; Date : 17 Sep 89 ; Version : 1.2 ; Module : SSFN2 ; Abstract: This module contains the routines LFN2 which prints a ; File Name and Type which is in Fixed-format FCB form to the ; currently logged LST: device, in a variable-length field, ; deleting spaces. Most significant bits of each character ; are masked off. The format of the output is: xxxxxxxx.yyy, ; where the name field consists of from 0 to 8 characters ; (0-8 x's) and the type is from 0 to 3 characters (0-3 y's). ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC LFN2 ; From SYSLIB Get.. EXT LOUT .Z80 CSEG ;=============================================================== ; NAME - LFN2 ; Entry: DE - Points to the first character of an FCB filename ; Exit : - None. The filename is printed to the LST: device ; Uses : - None ; Special Requirements: None ;=============================================================== LFN2: PUSH BC ; Save the BC register PUSH DE ; save regs PUSH AF LD B,8 ; 8 chars first CALL PRFNX LD A,'.' ; dot CALL LOUT ; Print to LST: device LD B,3 ; 3 more chars CALL PRFNX POP AF ; restore regs POP DE POP BC RET PRFNX: LD A,(DE) ; get char AND 7FH ; mask out msb CP ' ' ; space? CALL NZ,LOUT ; print to LST: device if not space INC DE ; pt to next DJNZ PRFNX ; count down RET END