TITLE "Z3QPRINT - Z3lib 4.0" ;================================================================ ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;---------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from Z3QPRINT.Z80 Ver 1.1 by Richard Conn ; Date : 8 Mar 87 ; Version : 1.2 ; Module : Z3QPRINT ; Abstract: This module contains the routine QPRINT which prints ; the Null-terminated string whose address is passed on the ; stack if the QUIET flag enables printing. Execution ; resumes at the byte following the terminating Null ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC QPRINT ; External References EXT GETQUIET, PRINT .Z80 CSEG ;=============================================================== ; NAME - QPRINT ; Entry: (STACK) - Top element Points to Null-terminated string ; Exit : - No value returned. Execution resumes after ending Null ; Uses : - None ; Special Requirements: None ;=============================================================== QPRINT: PUSH AF ;affect no regs CALL GETQUIET ;get flag JR Z,NOTQUIET ;not quiet, so print POP AF ;restore PSW EX (SP),HL ;get ptr to string PUSH AF ;save PSW QPR1: LD A,(HL) ;get next char INC HL ;pt to following char OR A ;end of string? JR NZ,QPR1 POP AF ;restore PSW EX (SP),HL ;done RET NOTQUIET: POP AF ;restore PSW JP PRINT ;perform normal print END