User Tools

Site Tools


cdc:nos2.source:nam5871:ndlckpt

NDLCKPT

Table Of Contents

  • [00005] PROC NDLCKPT(PORT,NODE$ID,PORT$STAT)
  • [00009] CHECKS FOR DUPLICATE PORT NUMBERS.
  • [00047] PROC NDLEM2
  • [00048] FUNC XCHD C(10)

Source Code

NDLCKPT.txt
  1. *DECK NDLCKPT
  2. USETEXT NDLER2T
  3. USETEXT NDLPS2T
  4. USETEXT NDLTBLT
  5. PROC NDLCKPT(PORT,NODE$ID,PORT$STAT);
  6. BEGIN
  7. *IF,DEF,IMS
  8. #
  9. ** NDLCKPT - CHECKS FOR DUPLICATE PORT NUMBERS.
  10. *
  11. * D.K. ENDO 81/10/12
  12. *
  13. * THIS PROCEDURE, GIVEN A PORT NUMBER AND NPU NODE I.D., DETERMINES
  14. * IF THE PORT NUMBER HAS ALREADY BEEN USED FOR A PREVIOUSLY DEFINED
  15. * LINE OR TRUNK.
  16. *
  17. * PROC NDLCKPT(PORT,NODE$ID,PORT$STAT)
  18. *
  19. * ENTRY PORT = PORT NUMBER TO BE CHECKED.
  20. * NODE$ID = NPU NODE I.D. THAT SUPPORTS PORT.
  21. *
  22. * EXIT PORT$STAT = RETURNED STATUS, SET TO TRUE IF PORT O.K.
  23. *
  24. * METHOD
  25. *
  26. * SEARCH FOR NODE$ID IN NPU TABLE.
  27. * IF NPU IS FOUND,
  28. * CHECK BIT MAP FOR PORT.
  29. * IF BIT IS SET,
  30. * THEN,
  31. * FLAG ERROR -- DUPLICATE PORT NUMBER.
  32. * CLEAR STATUS FLAG.
  33. * OTHERWISE,
  34. * SET BIT CORRESPONDING TO PORT
  35. * SET STATUS FLAG.
  36. *
  37. #
  38. *ENDIF
  39. ITEM PORT; # PORT NUMBER TO BE CHECKED #
  40. ITEM NODE$ID; # NPU NODE I.D. THAT SUPPORTS PORT #
  41. ITEM PORT$STAT B; # RETURN STATUS OF PORT #
  42. #
  43. **** PROC NDLCKPT - XREF LIST BEGINS
  44. #
  45. XREF
  46. BEGIN
  47. PROC NDLEM2; # MAKES ENTRY IN PASS 2 ERROR FILE #
  48. FUNC XCHD C(10); # CONVERTS INTEGER TO HEX DISPLAY CODE #
  49. END
  50. #
  51. ****
  52. #
  53. ITEM CTEMP C(10); # CHARACTER TEMPORARY #
  54. ITEM FOUND B; # NODE I.D. FOUND FLAG #
  55. ITEM I; # SCRATCH ITEM #
  56. ITEM ITEMP; # INTEGER TEMPORARY #
  57. ITEM J; # SCRATCH ITEM #
  58. CONTROL EJECT;
  59. # #
  60. # NDLCKPT CODE BEGINS HERE #
  61. # #
  62. FOUND = FALSE; # CLEAR FOUND FLAG #
  63. FOR I=1 WHILE NOT FOUND AND I LS NTWC[0] DO
  64. BEGIN
  65. IF NODE$ID EQ NTNID[I]
  66. THEN # IF NODE I.D. IS FOUND #
  67. BEGIN
  68. FOUND = TRUE;
  69. END
  70. ELSE # NOT FOUND YET #
  71. BEGIN
  72. I = I + NTENTSZ; # POINT TO NEXT ENTRY #
  73. END
  74. END
  75. IF FOUND # NPU WAS FOUND #
  76. THEN
  77. BEGIN
  78. ITEMP = PORT; # SAVE PORT NUMBER IN TEMPORARY #
  79. FOR J=0 STEP 1 WHILE ITEMP GQ 0 DO
  80. BEGIN # CALCULATE INDEX INTO PORT EXISTS BIP MAP#
  81. ITEMP = ITEMP - 60;
  82. END
  83. ITEMP = ITEMP + 60;
  84. IF B<ITEMP,1>NTWORD[I+J] NQ 1
  85. THEN # PORT HAS NOT BEEN USED #
  86. BEGIN
  87. B<ITEMP,1>NTWORD[I+J] = 1; # SET BIT CORRESPONDING TO PORT #
  88. PORT$STAT = TRUE; # RETURN STATUS O.K. #
  89. END
  90. ELSE # PORT WAS ALREADY USED #
  91. BEGIN
  92. CTEMP = XCHD(PORT); # CONVERT PORT TO DISPLAY CODE #
  93. NDLEM2(ERR102,STLNUM[0],CTEMP); # FLAG ERROR, DUPLICATE PORT #
  94. PORT$STAT = FALSE; # RETURN ERROR STATUS #
  95. END
  96. END
  97. ELSE # NODE I.D. NOT FOUND #
  98. BEGIN
  99. PORT$STAT = FALSE; # RETURN ERROR STATUS #
  100. END
  101. RETURN; # **** RETURN **** #
  102. END # NDLCKPT #
  103. TERM
cdc/nos2.source/nam5871/ndlckpt.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator