; Library: PARMLIB ; Version: 1.0 ; Module: PARCHR ; Version: 1.0 ; Author: Carson Wilson ; Date: July 10, 1989 ; Purpose: Scans string for character in A. ; public parchr ; ; PARCHR - Scans string for character in A. ; ; Entry: - holds character to search for. ; - points to null-terminated string. ; Exit: - (NZ) if character found, (Z) if not found. ; - holds character if found, 00 if none found. ; - points to found character or null terminator. ; Uses: - , . ; Notes: Does not scan for ^@. ; Stops at first match, starting with (HL). ; parchr: di ; Since we are changing unknown region dec (hl) inc (hl) ; Null? ei jr z,parchx ; Yes, quit cpi jr nz,parchr ; No match, test next dec hl ; Match found. Point to character. parchx: ld a,(hl) or a ; Result in Z flag ret end ; End PARCHR.Z80