TITLE "VIDN - Vlib 4.1" NAME ('VIDN') ;================================================================= ; 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 : 8 Mar 89 ; Version : 1.0 ; Module : VIDN ; Abstract: This module contains the routine GRWINIT which init- ; ializes TCAP data pointers, and checks for presence of ; extended routines and string definitions in the TCAP. ; Revision: ; 1.1 19 Jan 90 Joe Wright ; Modified to treat the graphics characters as a table. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC GZ3INIT ; External References EXT Z3VINIT, @GULC, @LD, @CD, @GO .Z80 CSEG ;=============================================================== ; GZ3INIT - Initialize Z3 VLIB routines and check for Extensions ; Entry: HL = Points to beginning of valid Z3 Environment ; Exit : A = Bitmap of capabilities. Zero Flag set on results ; B0 = 1 for DEL/INS Line, 0 if missing ; B1 = 1 for Clear to EOS, 0 if missing ; B2 = 1 for Graphics capability, 0 if missing ; B3 = 1 for 13 graphics chars, 0 if any missing ; Uses : AF ; Special Requirements: None ;=============================================================== GZ3INIT: CALL Z3VINIT ; Initialize VLIB tables PUSH HL ; Save regs PUSH DE PUSH BC LD C,0 ; Set initial result byte LD HL,@LD ; Point to first pointer to check LD B,2 ; ..and do two vectors CALL CMPLP JR Z,GZ3IN1 ; Jump if bad SET 0,C ; ..else show we have Line Delete/Insert GZ3IN1: LD HL,(@CD) ; Point to next ptr LD A,(HL) ; ..and get first byte OR A JR Z,GZ3IN2 ; Jump if bad SET 1,C ; ..else show we have Clear to EOS GZ3IN2: LD HL,@GO ; Point to next ptr LD B,2 ; ..do two vectors CALL CMPLP JR Z,GZ3IN3 ; Jump if bad SET 2,C ; ..else show we can do Graphics On/Off GZ3IN3: LD HL,@GULC ; Check for all box string definitions LD B,13 ; ..this many CALL CMPLPB ; Check graphics character table JR Z,GZ3IN4 ; Jump if any of them Not Defined SET 3,C ; ..else show we have them defined GZ3IN4: LD A,C ; Get status byte back POP BC ; Restore regs POP DE POP HL OR A ; ..and set status RET ; ; Check table for null entry CMPLPB: LD A,(HL) INC HL OR A RET Z DJNZ CMPLPB JR CMPEX ;..... ; Compare targets of vectors to see if strings exist. CMPLP: LD E,(HL) ; Get string addr INC HL LD D,(HL) INC HL LD A,(DE) ; Get first char of string OR A ; Anything there? RET Z ; ..return w/Bad status if Not DJNZ CMPLP ; Loop til all done CMPEX: OR 0FFH ; Set for Ok Graphics RET END