User Tools

Site Tools


cdc:nos2.source:nam5871:ns_dft

NS$DFT

Table Of Contents

  • [00003] PROC NS$DFT1)
  • [00005] NS$DFT - DAYFILE TEXT IN OCTAL DISPLAY CODE.
  • [00009] DAYFILE TEXT IN OCTAL DISPLAY.
  • [00036] PROC NS$DBG
  • [00042] PROC MESSAGE

Source Code

NS$DFT.txt
  1. *DECK NS$DFT
  2. USETEXT CYB$NS
  3. PROC NS$DFT((TEXTFWA),(N)); # DAYFILE TEXT IN OCTAL DISPLAY #
  4.  
  5. # TITLE NS$DFT - DAYFILE TEXT IN OCTAL DISPLAY CODE. #
  6.  
  7. BEGIN # NS$DFT #
  8. #
  9. ** NS$DFT - DAYFILE TEXT IN OCTAL DISPLAY.
  10. *
  11. * J.C. LEE 1981
  12. *
  13. * THIS ROUTINE CONVERTS OCTAL NUMBER TO DISPLAY CODE.
  14. *
  15. * PROC NS$DFT((TEXTFWA),(N))
  16. *
  17. * ENTRY:
  18. * TEXTFWA = FWA OF TEXT AREA.
  19. * N = NO OF TEXT WORDS TO BE CONVERTED.
  20. *
  21. * EXIT:
  22. * NONE.
  23. *
  24. * METHOD:
  25. * USE OCTAL TABLE TO CONVERT "N" NUMBER OF WORDS FROM
  26. * TEXT AREA TO OCTAL DISPLAY CODE.
  27. *
  28. #
  29.  
  30. ITEM TEXTFWA U; # FWA OF TEXT AREA TO BE DISPLAYED #
  31. ITEM N U; # NO OF TEXT WORDS TO BE DISPLAYED #
  32.  
  33. $BEGIN
  34. XREF
  35. BEGIN
  36. PROC NS$DBG; # TRACE PROCEDURE CALL #
  37. END
  38. $END
  39.  
  40. XREF
  41. BEGIN
  42. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  43. END
  44.  
  45. ARRAY DISTEXT [0:0] S(3);
  46. BEGIN # TEXT IN DISPLAY CODE #
  47. ITEM DFMSGTEXT C(0,0,20);
  48. ITEM DFMSGEND U(2,0,60) = [0];
  49. END
  50.  
  51. BASED ARRAY OCTTEXT [0:0] S(1);
  52. BEGIN # TEXT IN OCTAL DIGITS #
  53. ITEM OCTWORD U(0,0,60);
  54. END
  55.  
  56. ITEM I I; # LOOP INDUCTION VARIABLE FOR WORD COUNT #
  57. ITEM J I; # LOOP INDUCTION VARIABLE FOR CHAR CNT #
  58. ITEM K U; # TEMPORARY VARIABLE #
  59. ITEM OCTCTAB C(8) = "01234567";
  60. ITEM OCTNUM U; # OCTAL NUMBER #
  61.  
  62. CONTROL EJECT;
  63.  
  64. $BEGIN
  65. NS$DBG("DFT"); # TRACE CALL #
  66. $END
  67.  
  68. FOR I = 0 STEP 1 UNTIL (N - 1)
  69. DO # DISPLAY CONTENTS OF TEXT AREA #
  70. BEGIN
  71. P<OCTTEXT> = TEXTFWA + I; # ADDRESS OF WORD TO DISPLAY #
  72.  
  73. K = WL/3 - 1;
  74. FOR J = 0 STEP 1 UNTIL K
  75. DO # CONVERT OCTAL NUMBERS TO DISPLAY CODE #
  76. BEGIN
  77. OCTNUM = B<J*3,3>OCTWORD[0];
  78. C<J,1>DFMSGTEXT[0] = C<OCTNUM>OCTCTAB;
  79. END
  80.  
  81. MESSAGE(DISTEXT,3); # SEND MESSAGE TO LOCAL DAYFILE #
  82.  
  83. END
  84.  
  85. RETURN;
  86. END # NS$DFT #
  87. TERM
1)
TEXTFWA),(N
cdc/nos2.source/nam5871/ns_dft.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator