; TITLE "ATSDELM - Z3lib 4.0" NAME ('@SDELM') ;================================================================ ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;---------------------------------------------------------------- ; Author : Harold F. Bower ; Extracted from Z3PRSx.Z80 modules by Richard Conn ; Date : 27 Jul 89 ; Version : 1.3 ; Module : ATSDELM ; Abstract: This module contains @SDELM which checks for a delimiter ; character in "_.,:;<=>", Space, or non-printable char at the ; location addressed by HL. It has been extracted from ZPRS1, ; Z3PRS2 and Z3PRS3 to increase code re-utilization. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC @SDELM .Z80 CSEG ;=============================================================== ; NAME - @SDELM ; Entry: HL - Points to a character ; Exit : A = Addressed Character, Zero Flag Set (Z) if delimiter, ; end-of-line or Command separator. ; Zero Flag Reset (NZ) if NOT Delimiter character ; Uses : AF ; Special Requirements: None ;=============================================================== @SDELM: LD A,(HL) ; Get next char from line CP '_' ; Is it an Underscore? RET Z ; ..exit if so CP '.' ; Is it a Period? RET Z CP ',' ; Is it a Comma? RET Z CP '>' ; Is it greater than a Greater Sign? RET NC ; ..return if so CP ':' ; Is it any of ":;<=>"? JR NC,SDEL0 ; ..jump if so to set status CP ' ' ; Is it Less than a Space? RET NC ; ..return if so (Space has Zero set) XOR A ; Else must be less than Space, so.. RET ; ..return with a Zero in A SDEL0: CP A ; Set Zero flag retaining char RET END