TITLE "Z3CLRCL - Z3lib 4.0" ;================================================================ ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;---------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from Z3CLRCL.Z80 Ver 1.1 by Richard Conn ; Date : 21 Jan 88 ; Version : 1.0 ; Module : Z3CLRCL ; Abstract: This module contains the routine CLRCL which sets ; the ZCPR3 command line to empty ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC CLRCL ; External References EXT ENVPTR .Z80 CSEG ;=============================================================== ; NAME - CLRCL ; Entry: - None ; Exit : A <> 0 and Zero Flag Reset (NZ) if OK ; A = 0 and Zero Flag Set (Z) if no Command Line ; Uses : AF ; Special Requirements: None ;=============================================================== CLRCL: PUSH HL ;save regs PUSH DE LD HL,(ENVPTR) ;pt to environment LD DE,18H ;pt to entry ADD HL,DE LD A,(HL) ;get address in DE INC HL LD H,(HL) LD L,A ;check for no buffer OR H JR Z,CLRCL1 LD A,(HL) ;get low address of next char INC HL LD H,(HL) ;get high address of next char LD L,A XOR A ; Get a 0.. LD (HL),A ; ..and store 0 for no line DEC A ; Set 0FFH and NZ for OK CLRCL1: POP DE ;get regs POP HL RET END