TITLE "Z33GTECP - Z3lib 4.0" ;================================================================= ; Copyright (C) 1989 by Jay Sage. Permission granted to ; Alpha Systems Corp. to distribute with The Libraries, Version 4 ;----------------------------------------------------------------- ; Author : Jay Sage modified by Harold F. Bower ; Date : 1/3/88 ; Version : 1.0 ; Module : Z33GTECP ; Abstract: This module contains the routine GETECP which locates ; the name of the Extended Command Processor (ECP) in the ; Command processor and returns its address. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC GETECP ; External References EXT GETCCP ; Definitions OFFCMD EQU 25 ; Offset to Command Table .Z80 CSEG ;=============================================================== ; NAME - GETECP ; Entry: - None ; Exit : HL = Address of ECP Name ; Uses : HL ; Special Requirements : The Command Processor must not have been ; overwritten. ;=============================================================== GETECP: PUSH DE ; Save registers PUSH AF CALL GETCCP ; Get pointer to CCP LD DE,OFFCMD ; Offset to command table ADD HL,DE ; HL points to beginning of table LD E,(HL) ; Get length of each command to DE ; ..D already has 0 INC DE ; Add 2 for jump vectors INC DE INC HL ; Point to first command in table XOR A ; We will scan for terminating null SBC HL,DE ; Decrement to adjust for loop preincrement GETEC1: ADD HL,DE ; Point to next command name CP (HL) ; See if it is the terminating null JR NZ,GETEC1 ; ..loop til we get there INC HL ; Two bytes after null is ECP Name INC HL POP AF ; Restore regs for exit POP DE RET END