; TITLE "SCPOUT - Syslib 4.0" NAME ('CPOUT') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SCPOUT.Z80 by Richard Conn ; Date : 11 Jun 89 ; Version : 1.3 ; Module : SCPOUT ; Abstract: This module contains the routine CPOUT which outputs ; characters with control character processing to the PUN: ; device. 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 CPOUT ; External References EXT @CCCHK, POUT .Z80 CSEG ;=============================================================== ; NAME - CPOUT ; Entry: A - Contains the character to be printed ; Exit : - Nothing returned, the character is printed on PUN: ; Uses : - None ; Special Requirements: None ;=============================================================== CPOUT: CALL @CCCHK ; Check for Printable chars or.. ; .., , , , JP Z,POUT ; Punch if so ; Punch others as Ctrl-Char PUSH AF ; Save A PUSH AF LD A,'^' ; Up Arrow CALL POUT ; Print to PUN: POP AF ; Get char ADD A,40H ; Convert to char CALL POUT ; Print to PUN: POP AF ; Restore Registers RET END