*DECK IKDIS
USETEXT KDIS
USETEXT DRHDR
USETEXT DISTAIL
USETEXT NIPDEF
USETEXT OVERLAY
USETEXT KINITBF
PROC IKDIS; # INITIAL K-DISPLAY BUFFERS AND POINTERS #
STARTIMS;
#
*1DC IKDIS
*
* 1. PROC NAME AUTHOR DATE
* IKDIS A. BEN-ARTZI 81/11/06
*
* 2. FUNCTIONAL DESCRIPTION.
* THIS ROUTINE INITIALIZE THE K-DISPLAY FOR NAM,THE INVOLVING
* COMMON BLOCKS AND THE BASIC SCREEN.
*
* 3. METHOD USED.
* GET A BUFFER AND INITIALIZE IT AS A BASIC SCREEN.
* SET POINTERS TO POINT TO BUFFERS.
* CALL MACRO CONSOLE TO INITIATE K-DISPLAY.
* CALL MACRO MESSAGE TO CLEAR FLUSHING MESSAGE FROM B-DISPLAY.
*
* 4. ENTRY PARAMETERS. NONE
*
* 5. EXIT PARAMETERS. NONE
*
* 6. COMDECKS CALLED + SYMPL TEXT USED.
* KDIS DISTAIL
* NIPDEF KINITBF DRHDR
*
*
*
*
* 7. ROUTINES CALLED
* OMSG OUTPUT DAYFILE MESSAGE
* MGETS ALLOCATE INITIAL BUFFER
* CSTATUS GET CONSOLE TYPE FROM SYSTEM
* CONSOL CALL SYSTEM MACRO-S
* OVLCALL CALL OVERLAY
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
* THIS PROCEDURE IS CALLED BY INIP.
#
STOPIMS;
#
EXTERNAL VARIABLES
#
XREF BEGIN
PROC MGETS; #GET BUFFER #
PROC CONSOL; #CALL SYSTEM MACRO #
FUNC CSTATUS; #CALL SYSTEM CSTATUS MACRO #
PROC OMSG ;
PROC OVLCALL;
END
# A BASIC BLANK LINE #
ITEM INDEX U ;
ITEM KADDR U ;
ITEM KBLANK C(10) = O"55555555555555550000" ;
ITEM ENDLOOP I = 0 ;
ITEM LAST I = 0 ;
ARRAY KBLNK S(1);
BEGIN
ITEM KZEROS C(00,00,60) = [0]; # ZERO LINE TO BLANK B DISPLAY#
END
ARRAY CTYPE S(1);
BEGIN
ITEM CONTYPE U(0,0,12); # ACTUAL CONSOLE TYPE FIELD #
ITEM CONWRD U(0,0,WL)=[0]; # FULL WORD CONSOLE TYPE PARAM#
END
BEGIN
#
FIRST, DETERMINE CONSOLE TYPE AND SET KDIS TO REFLECT IT
#
CONWRD=CSTATUS;
IF CONTYPE EQ 0 THEN
KLSIZE[0]=KBF545;
ELSE
KLSIZE[0]=KBF721;
KRSIZE[0]=KLSIZE[0]+4;
KDVWLN[0]=KLSIZE[0]-7;
#
GET A BUFFER AND FORMAT IT
#
MGETS(KLSIZE+BLKHSIZE+KHDRSIZE,KADDR,TRUE);
#
AND SET THE K-DISPLAY BLOCK HEADER
#
P<DRHDRWD> = KADDR ;
BLKID[0] = KDISIDVALUE ;
BACKPTR[0] = LOC(KDBP[0]) ;
NEXTPTR[0] = LOC(KDFP[0]) ;
# #
P<KINITBF> = 0 ;
ENDLOOP = KLSIZE[0] + KADDR + BLKHSIZE + KHDRSIZE - KERRL - 3;
KDTYPE[KADDR+BLKHSIZE] = KDISTYPE ;
# #
FOR INDEX = KADDR+BLKHSIZE+KHDRSIZE STEP 1 UNTIL ENDLOOP DO
BEGIN
KWORD[INDEX] = KBLANK ;
END
#
FILL THE ERROR LINE WITH BLANKS
#
KERROR[ENDLOOP+1] = " ";
KWORD[ENDLOOP+KERRL]=KBLANK; # TERMINATE WORD WITH BLANK #
LAST = KADDR + BLKBS[0] - 1 ;
K311[LAST-1] = " ";
KREADY[LAST-1]="READY..";
K312[LAST-1] = 0 ;
#
SET A POINTER TO DISTAIL COMMON BLOCK
#
KDSTAIL[LAST] = LOC(KDTLNAM)+1;
K7777[LAST] = O"7777" ;
#
SET FIELDS IN KDIS COMMON BLOCK
#
KDKBUF[0] = LOC(KBUF1) ;
KDRSCR[0] = LOC(KDRCONSL) ;
KDLSCR[0] = LOC(KDLCONSL) ;
KDLSTOP[0] =KADDR+BLKHSIZE+KHDRSIZE;
KDFP[0] = KADDR ;
KDBP[0] = KADDR ;
KDRNXT[0] = 1;
#
FIELDS ARE PREPARED FOR CONSOLE MACRO.
HEADER WORD CONTAINS - TYPE-IN ADDR,RIGHT SCREEN,LEFT SCREEN
#
CONSOL(KDWDCON) ;
OMSG(KBLNK,2) ; # AND CLEAR THE B DISPLAY #
KDIS$RT = KDST[0] AND KFAST[0];
RETURN;
END
TERM