; TITLE "SCFN2 - Syslib 4.0" NAME ('PFN2') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SPFN2.Z80 by Richard Conn ; Date : 17 Sep 89 ; Version : 1.2 ; Module : SCFN2 ; Abstract: This module contains the routine PFN2 which prints a ; File Name and Type which is in Fixed-format FCB form to ; the currently logged CON: 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 charac- ; ters (0-3 y's). ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC PFN2 ; From SYSLIB Get.. EXT COUT .Z80 CSEG ;=============================================================== ; NAME - PFN2 ; Entry: DE - Points to the first character of an FCB filename ; Exit : - No parameters returned, the filename is printed to ; the current PUN: device ; Uses : - None ; Special Requirements: None ;=============================================================== PFN2: PUSH BC ; Save the BC register PUSH DE ; save regs PUSH AF LD B,8 ; 8 chars first CALL PRFNX LD A,'.' ; dot CALL COUT ; Print to CON: 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 MSB CP ' ' ; space? CALL NZ,COUT ; print to CON: if not space INC DE ; pt to next DJNZ PRFNX ; count down RET END