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
/
SLIB1.LBR
/
SCLOUT.Z80
< prev
next >
Wrap
Text File
|
2000-06-30
|
1KB
|
61 lines
;
; SYSLIB Module Name: SCLOUT
; Author: Richard Conn
; SYSLIB Version Number: 3.6
; Module Version Number: 1.1
public clout
;
; CLOUT --
; LIST OUTPUT ROUTINE WITH CONTROL CHARACTER PROCESSING
; OUTPUT CHAR IN REG A ON LST:
; AFFECT NO REGISTERS OR FLAGS
;
EXT LOUT
CLOUT:
CP ' ' ; CHECK FOR LESS THAN <SP>
JP NC,LOUT ; PROCESS NORMALLY IF EQUAL OR GREATER
;
; TRAP OUT <NULL>, <BEL>, <BS>, <LF>, <CR>
;
CP NULL ; <NULL>
JP Z,LOUT
CP BEL ; <BEL>
JP Z,LOUT
CP BS ; <BS>
JP Z,LOUT
CP LF ; <LF>
JP Z,LOUT
CP CR ; <CR>
JP Z,LOUT
;
; PRINT AS CTRL-CHAR
;
PUSH AF ; SAVE A
PUSH AF
LD A,'^' ; PRINT UP ARROW
CALL LOUT
POP AF ; GET CHAR
ADD 40H ; CONVERT TO CHAR
CALL LOUT
POP AF ; RESTORE A
RET
;
; ASCII SPECIAL CHARACTER EQUATES
;
NULL EQU 0 ; NULL
BEL EQU 7 ; BELL
BS EQU 8 ; BACKSPACE
TAB EQU 9 ; TAB
LF EQU 10 ; LINE FEED
CR EQU 13 ; CARRIAGE RETURN
CTRLR EQU 'R'-40H ; CTRL-R
CTRLU EQU 'U'-40H ; CTRL-U
CTRLX EQU 'X'-40H ; CTRL-X
DEL EQU 7FH ; DELETE CHAR
END