; TITLE "SSCANNER - Syslib 4.0" NAME ('SCANNE') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SSCANNER.Z80 Ver 1.1 by Richard Conn ; Date : 17 Sep 89 ; Version : 1.2 ; Module : SSCANNER ; Abstract: This module contains the routine SCANNER which scans ; one string for a second sub-string. If found, a pointer ; to the beginning of the matching sub-string in the primary ; string is returned. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC SCANNER .Z80 CSEG ;=============================================================== ; NAME - SCANNER ; Entry: HL - Contains the starting address of a string to search ; B - Length of the string in HL ; DE - Starting address of the sub-string for which to srch ; C - Length of sub-string in DE ; Exit : F - Zero Flag Set (Z) if found (A is indeterminate) ; A = 0FFH, Zero Flag Reset (NZ) if NOT found ; HL - Address of matching sub-string in main str if found ; Uses : AF,HL ; Special Requirements: None ;=============================================================== SCANNER: PUSH BC ; Save Registers PUSH HL ;..and enter main Loop SCAN: LD A,B ; Done if B