*DECK BLINK USETEXT NIPDEF USETEXT DRHDR USETEXT AT USETEXT ACB USETEXT ACNB USETEXT KDIS USETEXT KHDRX PROC BLINK((BUFADDR),(CBADDR)); # LINK A DATA BLOCK TO DATA RING # STARTIMS; # *1DC BLINK * * 1. PROC NAME AUTHOR DATE * BLINK E. GEE 77/09/14 * * 2. FUNCTIONAL DESCRIPTION. * LINK DATA BLOCK TO DATA RING * * 3. METHOD USED. * CHECK IF DATA RING ALREADY EXISTS * IF SO, ADD NEW ENTRY TO END OF RING * IF NOT, CREATE DATA RING WITH NEW ENTRY * UPDATE K-DISPLAY BUFFER IF NECESSARY. * * 4. ENTRY PARAMETERS. * BUFADDR ADDR OF DATA BLOCK TO ADD TO RING * ACNBADDR ADDR OF ACB/ACNB TO QUEUE DATA BLK DATA * * 5. EXIT PARAMETERS. * NONE * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * ACB ACNB AT * DRHDR NIPDEF KDIS * * 7. ROUTINES AND OVERLAYS CALLED. * HUPDDAW UPDATE DATA AVAILABLE WORD * HWRAVAL WRITE DATA AVAILABLE WORD * KPUT UPDATE K-DISPLAY BUFFER * INSCDR INSERT ACNB IN CONNECTION DATA RING * XTRACE RECORD PROCEDURE CALLS * * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION. * NONE * # STOPIMS; # INPUT PARAMETERS # ITEM BUFADDR; # FWA OF DATA BLOCK TO LINK # ITEM CBADDR; # FWA OF DATA STRUCTURE ACB/ACNB/NCNB # # EXTERNAL VARIABLES # XREF BEGIN PROC HUPDDAW; # UPDATE DATA AVAILABLE WORD # PROC HWRAVAL; # UPDATE UCP-S DATA AVAIALABILITY WORD # PROC INSCDR; # INSERT ACNB IN CONNECTION DATA RING # PROC KPUT; # UPDATE STATUS DISPLAY CONTENT # PROC XTRACE; # TRACE PROCEDURE CALL # END # LOCAL VARIABLES # ITEM TEMP1; # TEMPORARY VARIABLE # ITEM TEMP2; # TEMPORARY VARIABLE # CONTROL EJECT; BEGIN # BLINK # CONTROL IFEQ DEBUG,1; XTRACE("BLINK"); # TRACE CALL # CONTROL FI; P = CBADDR; # ACNB/NCNB/ACB FWA # P = BUFADDR; # FWA OF DATA BLOCK TO ADD TO RING # DRID[0] = DRIDVALUE; # SET DATA RING ID # TEMP1 = LOC(ACNBDRFP[0]); NEXTPTR[0] = TEMP1; # SET FORWARD PTR IN DATA BLOCK # IF ACNBDRFP[0] EQ 0 THEN # DATA RING NOT YET EXISTS, CREATE ONE # BEGIN BACKPTR[0] = TEMP1; ACNBDRFP[0] = BUFADDR; END ELSE # ADD DATA BLOCK TO DATA RING # BEGIN BACKPTR[0] = ACNBDRBP[0]; P = ACNBDRBP[0]; NEXTPTR[0] = BUFADDR; END ACNBDRBP[0] = BUFADDR; IF ACNBID[0] NQ NCNBIDVALUE THEN # ITS AN ACB OR ACNB # BEGIN IF ACNBID[0] EQ ACNBIDVALUE THEN # IT IS AN ACNB # BEGIN # INCREMENT DATA BLOCKS QUEUED COUNT # P = ATACBA[ACNBAN[0]]; # FWA OF ACB # HUPDDAW(P,P,1,1); # UPDATE DATA AVAILABLE WORD # IF ACNBCDRFP[0] EQ 0 THEN # ACNB IS NOT IN CON DATA RING # BEGIN INSCDR(P); # INSERT ACNB IN CONN DATA RING # END TEMP1 = KPAPNDM; TEMP2 = ACBBLKSQ[0]; END ELSE # IT IS AN ACB # BEGIN # INCREMENT SUPERVISORY MESSAGE QUEUED COUNT # P = CBADDR; ACBSMQ[0] = ACBSMQ[0] + 1; TEMP1 = KPAPNSM; TEMP2 = ACBSMQ[0]; IF TEMP2 EQ 1 THEN # QUEUED 1ST SUP MSG FOR APP # BEGIN HWRAVAL(P,TRUE); # UPDATE AIP-S DATA AVAIL WORD # END END IF KDIS$RT AND ACBKNDX[0] NQ 0 AND ACBKNDX[0] GQ KDAPPST[0] AND ACBKNDX[0] LQ KDAPPND[0] THEN # UPDATE STATUS DISPLAY # KPUT(KHDRNP[0],ACBKNDX[0]-KDAPPST[0],TEMP1,TEMP2); END ELSE # IT IS A NCNB # ACNBBLKSQ[0] = ACNBBLKSQ[0] + 1; # INCREMENT BLKS QUEUED # RETURN; END # BLINK # TERM