TITLE "Z3SHEMPT - Z3lib 4.0" ;================================================================ ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;---------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from Z3SHEMPT.Z80 Ver 1.1 by Richard Conn ; Date : 8 Mar 87 ; Version : 1.2 ; Module : Z3SHEMPT ; Abstract: This module contains the routine SHEMPTY which tests ; the shell stack and returns a flag indicating the results ; of the test ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC SHEMPTY ; External References EXT GETSH .Z80 CSEG ;=============================================================== ; NAME - SHEMPTY ; Entry: - None ; Exit : A = 0, Zero Flag Set (Z) if Empty ; A <> 0, Zero Flag Reset (NZ) if NOT Empty ; Uses : AF ; Special Requirements: None ;=============================================================== SHEMPTY: PUSH HL ;save HL CALL GETSH ;get ptr to shell stack JR Z,NOSHELL ;error if no shell stack LD A,(HL) ;check first element NOSHELL: OR A ;set flags POP HL ;get HL RET END