.NLIST TOC,SYM .TITLE $FNASC .SBTTL ULBLIB 016 - Convert RAD50 file name to ASCII .IDENT \V01.00\ .PSECT .LIBC. .ENABL LC,GBL ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. ;+ ; $FNASC ; The Convert File Name to ASCII routine converts a RAD50 device/file name ; block into the format "ddd:filnam.typ" with blank suppression. ; ; R0 -> File name ; R1 -> Output buffer ; ; CALL $FNASC ; ; R1 is updated past the end of the converted file name. ;- SPACE = 40 $FNASC:: JSR R5,$SAVRG ;Save non-volatile registers MOV R1,R4 ;Copy pointer to buffer MOV R0,R3 ;Copy pointer to file name TST @R0 ;Device name present? BNE 1$ ;Branch if so TST (R3)+ ;Skip the device name BR 2$ ; 1$: CALL 3$ ;Convert a word with blank suppression MOVB #':,(R1)+ ;Put in the ":" 2$: TST @R3 ;File name present? BEQ 5$ ;Branch if not. Done CALL 3$ ;Convert the file name CALL 3$ ; both words MOVB #'.,(R1)+ ;Put in the "." 3$: MOV (R3)+,R0 ;Get the RAD50 word CALL $R50ASC ;Convert it to ASCII 4$: CMPB #SPACE,-1(R1) ;Was the last character blank? BNE 5$ ;Branch if not DEC R1 ;Back up CMP R1,R4 ;Done? BNE 4$ ;Branch if not 5$: RETURN .END