home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
ZCNFG23.LBR
/
CFGLIB.LBR
/
SDELM.ZY0
/
SDELM.ZY0
Wrap
Text File
|
2000-06-30
|
1KB
|
35 lines
public sdelm
; This routine checks for a delimiter character pointed to by HL. It returns
; with the character in A and the zero flag set if it is a delimiter. All
; registers are preserved except A. The delimiters tested for include all
; control characters
sdelm:
ld a,(hl) ; Get the character
exx ; Use alternate register set (shorter code)
ld hl,deldat ; Point to delimiter list
ld bc,delend-deldat; Length of delimiter list
cpir ; Scan for match
exx ; Restore registers
ret z ; Returns Z if delimiter
cp ' '+1 ; test for space or control char
ret nc ; ..returns nz if not
xor a ; make Z flag for control char
ld a,(hl) ; ..and recover the char.
ret
deldat: ; List of delimiter characters
db ',' ; comma
db '/' ; indicates lib srch (22/08/88)
db ':' ; colon
db '.' ; period
db '=' ; equality sign
db ';' ; semicolon
db '<' ; left angle bracket
db '>' ; right angle bracket
db '_' ; underline
delend:
end