TITLE "VIDL - Vlib 4.3" NAME ('VIDL') ;================================================================= ; Copyright (C) 1989 by Harold F. Bower. Permission granted to ; Alpha Systems Corp. to distribute with The Libraries, Version 4 ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Date : 4 Mar 89 ; Version : 1.0 ; Module : VIDL ; Abstract: This module contains the routine SPDMCHR which sets ; the Pull Down Menu Escape character, normally 1BH (Esc) ; or 1CH (Control-\). It also contains the routine ISPDM ; which checks a character to see if it is the escape char. ; Revision: ; 1.1 - 3 Oct 90 - shortened code. HFB ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC SPDMCHR, ISPDM ; External References EXT @PDMCH .Z80 CSEG ;=============================================================== ; SPDMCHR -Set Pull Down Menu escape character ; Entry: A = New escape char ; Exit : - None ; Uses : - None ; Special Requirements: None ;=============================================================== SPDMCHR: LD (@PDMCH),A RET ;=============================================================== ; ISPDM - Check for Pull Down Menu escape character ; Entry: A = Character to check ; Exit : A = Char, Zero Flag Set (Z) if NOT the escape char ; Zero Flag Clear (NZ) if it IS the escape char ; Uses : Zero Flag ; Special Requirements: None ;=============================================================== ISPDM: PUSH HL ; Save regs LD HL,@PDMCH ; Point to the set char CP (HL) ; Same? POP HL ; .(restore regs) JR Z,ISPDM0 ; ..jump if same CP A ; Else set zero flag for no match RET ISPDM0: OR A ; Clear Zero flag RET ; ..and quit END