User Tools

Site Tools


cdc:nos2.source:nam5871:nfetch

NFETCH

Table Of Contents

  • [00002] FUNC NFETCH(BARRAY,SYMBOL) I

Source Code

NFETCH.txt
  1. *DECK NFETCH
  2. FUNC NFETCH(BARRAY,SYMBOL) I;
  3. BEGIN
  4. *IF,DEF,IMS
  5. #
  6. *1DC NFETCH
  7. * 1.PROC NAME AUTHOR DATE
  8. * NFETCH PETER TAM 6/24/77
  9. *
  10. * 2.FUNCTIONAL DESCRIPTION
  11. * NFETCH DOES A TABLE LOOKUP OF THE REQUIRED ITEM
  12. * TO OBTAIN ITS COORINATES (I.E INDEX WITHIN ARRAY,
  13. * STARTING BIT WITHIN WORD AND LENGTH IN BITS)
  14. * AND RETURNS TO THE CALLER THE REQUIRED FIELD.
  15. * THE TABLE CONTAINING THIS INFORMATION IS ASSEMBLED
  16. * IN THE COMPASS ROUTINE NP$SYM , WHICH IN TURN
  17. * USES THE ITEM, DEF AND STATUS MACROS DEFINED IN NETMAC.
  18. *
  19. * 3.METHOD USED
  20. * NFETCH IS A SYMPL ROUTINE CALLABLE BY FTN CALLING SEQUENCES
  21. * TO ACCESS SUPERVISORY MESSAGE FIELDS IN SYMPL COMMON DECKS.
  22. * IT IS TO BE ACCESSED AS AN FTN INTEGER FUNCTION
  23. * I=NFETCH(ARRAY,ITEM)
  24. * WHERE ARRAY IS AN ARRAY CONTAINING THE SUPERVISORY MESSAGE
  25. * ITEM IS THE LEFT JUSTIFIED ZERO FIELD DISPLAY CODE NAME
  26. * OF THE REQUIRED FIELD IN THE SUPERVISORY MESSAGE.
  27. *
  28. * 4.ENTRY CONDITIONS
  29. * SEE FUNCTIONAL DESCRIPTION
  30. *
  31. * 5. EXIT CONDITIONS
  32. * THE VALUE OF THE FUNCTION WILL BE SET TO THE FIELD SPECIFIED.
  33. *
  34. * 6.COMDECKS CALLED
  35. * NP$CRT
  36. *
  37. * 7.ROUTINES CALLED
  38. * NP$ERR
  39. *
  40. * 8.DAYFILE MESSAGES
  41. * NETWORK APPLICATION ABORTED, RC = 68.
  42. * NFETCH: ILLEGAL FIELD MNEMONIC.
  43. *
  44.  #
  45. *ENDIF
  46. *CALL NP$CRT
  47. XREF PROC NP$ERR;
  48. XREF ITEM NP$SYME U;
  49. XREF ARRAY NP$SYM[0:300] S(2);
  50. BEGIN
  51. ITEM SYMNAME C(0,0,7);
  52. ITEM SYMST U(0,54,6);
  53. ITEM SYMWORD U(1,6,12);
  54. ITEM SYMBIT U(1,18,12);
  55. ITEM SYMLGTH U(1,30,12);
  56. ITEM SYMVAL U(1,0,60);
  57. END
  58. ARRAY BARRAY[0:O"77777"] S(1);
  59. ITEM CONTENTS U;
  60. ITEM SYMBOL U;
  61. ITEM I U;
  62. ITEM J U;
  63. FOR I = 0 STEP 1 UNTIL NP$SYME DO
  64. BEGIN
  65. IF SYMNAME[I] EQ C<0,7>SYMBOL
  66. THEN BEGIN
  67. J = SYMST[I];
  68. IF J EQ 4
  69. THEN BEGIN
  70. NFETCH = SYMVAL[I];
  71. RETURN;
  72. END
  73. IF J EQ 3 OR J EQ 2
  74. THEN BEGIN
  75. NFETCH =
  76. B<SYMBIT[I],SYMLGTH[I]>CONTENTS[SYMWORD[I]];
  77. RETURN;
  78. END
  79. IF J EQ 1
  80. THEN BEGIN
  81. NFETCH =
  82. C<SYMBIT[I],SYMLGTH[I]>CONTENTS[SYMWORD[I]];
  83. RETURN;
  84. END
  85. END
  86. END
  87. NP$ERR("68"); # ILLEGAL FIELD MNEMONIC. #
  88. END
  89. TERM
cdc/nos2.source/nam5871/nfetch.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator