; TITLE "SCLOUT - Syslib 4.0" NAME ('CLOUT') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SCLOUT.Z80 by Richard Conn ; Date : 11 Jun 89 ; Version : 1.3 ; Module : SCLOUT ; Abstract: This module contains the routine CLOUT which outputs ; characters with control character processing. All control ; characters except for NULL, BEL, BS, LF and CR are printed ; as "^" followed by the character offset by 40H. (i.e. 02H ; is printed as "^B"). ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC CLOUT ; External References EXT @CCCHK, LOUT .Z80 CSEG ;=============================================================== ; NAME - CLOUT ; Entry: A = Character to be printed ; Exit : - Nothing returned, the character is printed on LST: ; Uses : - None ; Special Requirements: None ;=============================================================== CLOUT: CALL @CCCHK ; Check for Printable chars or.. ; .., , , , JP Z,LOUT ; Print normally if so ; Print others as Ctrl-Char PUSH AF ; Save A PUSH AF LD A,'^' ; Up Arrow CALL LOUT ; Print to LST: POP AF ; Get char ADD A,40H ; Convert to char CALL LOUT ; Print to LST: POP AF ; Restore Registers RET END