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
/
ZSYS
/
SIMTEL20
/
SYSLIB
/
SLIB2.LBR
/
SISPRINT.Z80
< prev
next >
Wrap
Text File
|
2000-06-30
|
640b
|
34 lines
;
; SYSLIB Module Name: SISPRINT
; Author: Richard Conn
; SYSLIB Version Number: 3.6
; Module Version Number: 1.1
public isprint
;
; ISPRINT returns Zero Flag Set if char in A is printable
; ( >= space, < DEL). ISPRINT returns NZ if not.
;
; Char in A is unaffected.
;
ISPRINT:
PUSH BC ; SAVE BC
LD C,A ; SAVE CHAR IN C
AND 7FH ; MASK OUT MSB
CP ' ' ; LESS THAN SPACE?
JP C,NO
CP 7FH ; LESS THAN DELETE?
JP Z,NO
XOR A ; SET FLAG
LD A,C ; GET CHAR
POP BC ; RESTORE BC
RET
NO:
LD A,0FFH ; SET FLAG
OR A
LD A,C ; GET CHAR
POP BC ; RESTORE BC
RET
END