; TITLE "SAFNCMP - Syslib 4.0" NAME ('AFNCMP') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Extracted & Derived from SDIR07.Z80 (COMP2) by Richard Conn ; Date : 17 Sep 89 ; Version : 1.0 ; Module : SAFNCMP ; Abstract: This module contains the routine @AFNCHK which ; compares the least 7 bits of each character in two ; strings with "?" characters in one string matching all. ; This routine is most often used in selecting ambiguous ; filename entries. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC @AFNCMP .Z80 CSEG ;=============================================================== ; NAME - @AFNCMP ; Entry: HL - Points to a character array ; DE - Points to a second character array ; B - Number of characters to compare ; Exit : F - Zero Flag Set (Z) if Match, else Zero Reset (NZ) ; HL,DE - point to character causing mismatch or after ; ending char in array if successful match ; Uses : AF,BC,DE,HL ; Special Requirements: None ;=============================================================== @AFNCMP: LD A,(HL) ; Get (HL) AND 7FH ; Mask MSB CP '?' ; Match '?' JR Z,COMP2A LD C,A ; ...in C LD A,(DE) ; Compare AND 7FH ; Mask MSB CP C RET NZ COMP2A: INC HL ; Pt to next INC DE DJNZ @AFNCMP ; Count down RET END