User Tools

Site Tools


cdc:nos2.source:nam5871:odayfl

ODAYFL

Table Of Contents

  • [00004] PRGM ODAYFL
  • [00056] PROC OMSG
  • [00057] PROC XTRACE

Source Code

ODAYFL.txt
  1. *DECK ODAYFL
  2. USETEXT NIPDEF
  3. USETEXT PARAMS
  4. PRGM ODAYFL; # DISPLAY CONTENTS OF NIP-S MEM #
  5. STARTIMS;
  6. #
  7. *1DC ODAYFL
  8. *
  9. * 1. PROC NAME AUTHOR DATE
  10. * ODAYFL E. GEE 86/09/25
  11. *
  12. * 2. FUNCTIONAL DESCRIPTION.
  13. * DISPLAY THE CONTENTS OF NIP-S MEMORY IN OCTAL AND HEX.
  14. *
  15. * 3. METHOD USED.
  16. * LOOP FOR EACH WORD TO BE DISPLAYED IN NAM DAYFILE.
  17. * CONVERT CONTENTS OF WORD TO OCTAL DISPLAY.
  18. * CONVERT CONTENTS OF WORD TO HEX DISPLAY.
  19. * CALL OMSG TO DAYFILE THE DISPLAYED CONTENTS.
  20. *
  21. * 4. ENTRY PARAMETERS.
  22. * PARAMS1 FWA TO DISPLAY CONTENTS OF
  23. * PARAMS2 NO OF WORDS TO DISPLAY CONTENTS OF
  24. *
  25. * 5. EXIT PARAMETERS.
  26. * NONE
  27. *
  28. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  29. * NIPDEF NIP CONSTANT DEFINITIONS
  30. * PARAMS COMMON BLOCK FOR PASSING PARAMETERS TO
  31. * AND FROM SECONDARY OVERLAYS.
  32. *
  33. * 7. ROUTINES AND OVERLAYS CALLED.
  34. * OMSG ISSUE DAYFILE MESSAGE
  35. * XTRACE RECORD PROCEDURE CALLS
  36. *
  37. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  38. *
  39. * THIS PROGRAM IS A SECONDARY OVERLAY LOADED BY SUBROUTINE
  40. * OVLCALL. WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO
  41. * LOCATION RJMAIN TO RETURN TO THE CALLING PROGRAM.
  42. *
  43. *
  44. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  45. * OVERLAY BUFFER SIZE MINUS 5 (443B WORDS).
  46. *
  47. * THIS OVERLAY IS CALLED BY HPRUSM, NGIGO, AND NLOPIP.
  48. *
  49.  #
  50. STOPIMS;
  51. #
  52.   EXTERNAL VARIABLES
  53. #
  54. XREF
  55. BEGIN
  56. PROC OMSG; # ISSUE DAYFILE MESSAGE #
  57. PROC XTRACE; # RECORD PROCEDURE CALLS #
  58. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  59. END
  60. #
  61.   INTERNAL VARIABLES
  62. #
  63. #
  64.  ARRAY TO HOLD DISPLAY CODE DATA TO DAYFILE
  65. #
  66. ARRAY TRAPMSG[0:3] S(1);
  67. BEGIN
  68. ITEM WDMSG C(0,0,10);
  69. ITEM ENDMSG U(0,42,18) = [,,,0];
  70. END
  71. #
  72.  TEMPLATE OF WORD TO DISPLAY
  73. #
  74. BASED ARRAY OCTMSG P(1);
  75. ITEM OCTWD U(0,0,60);
  76.  
  77. ITEM ADDR; # FWA OF WORD TO DISPLAY #
  78. ITEM CHARPOS; # NEXT POSITION TO INSERT CHA #
  79. ITEM HEXCHAR; # HEX DIGIT TO BE DISPLAYED #
  80. ITEM MSGNO; # CURRENT WORD IN DAY MSG BUFFER#
  81. ITEM NUM; # NUMBER OF WORDS TO DISPLAY #
  82. ITEM NUMPOS; # NEXT POSITION TO PICK UP NO #
  83. ITEM TEMP2; # COUNTER FOR WORD TO DISPLAY #
  84.  
  85. #**********************************************************************#
  86.  
  87. BEGIN
  88.  
  89. CONTROL IFEQ DEBUG,1;
  90. XTRACE("DAYFL") ; # TRACE PROCEDURE CALL #
  91. CONTROL FI;
  92.  
  93. ADDR = PARAMS1; # FWA TO DISPLAY CONTENTS OF #
  94. NUM = PARAMS2; # NUMBER OF WORD TO DISPLAY #
  95. #
  96.   LOOP ONCE FOR EACH WORD TO DISPLAY CONTENTS OF WORD
  97. #
  98. FOR TEMP2 = 0 STEP 1 UNTIL NUM-1 DO
  99. BEGIN
  100. P<OCTMSG> = ADDR + TEMP2; # ADDR OF WORD TO DISPLAY #
  101. CHARPOS = 0;
  102. MSGNO = 0;
  103. NUMPOS = 0;
  104. #
  105.   LOOP ONCE FOR EACH OCTAL DIGIT TO CONVERT TO OCTAL DISPLAY CODE
  106. #
  107. FOR NUMPOS = 0 STEP 3 UNTIL 57 DO
  108. BEGIN
  109.  
  110. # MASK OFF OCTAL DIGIT AND ADD 33B TO FORM DISPLAY CODE #
  111. # EQUIVALENCE. SINCE EACH OCTAL DIGIT (3 BITS) BECOMES A CHAR #
  112. # (6 BITS) TWO WORDS ARE REQUIRED TO HOLD THE DISPLAY CODE DATA#
  113.  
  114. B<CHARPOS,6>WDMSG[MSGNO] = B<NUMPOS,3>OCTWD[0] + O"33";
  115. IF CHARPOS EQ 54
  116. THEN # FIRST WORD HAS BEEN FILLED UP #
  117. BEGIN
  118. CHARPOS = 0; # INIT FOR 2ND WORD OF TRAPMSG #
  119. MSGNO = MSGNO + 1; # UPDATE TO POINT TO SECOND WORD#
  120. END
  121. ELSE # FIRST WORD NOT FILLED YET #
  122. BEGIN
  123. CHARPOS = CHARPOS + 6; # UPDATE PTR FOR INSERTING CHAR #
  124. END
  125. END
  126. #
  127.   INSERT 2 BLANKS BETWEEN OCTAL AND HEX DISPLAY
  128. #
  129. B<0,12>WDMSG[MSGNO] = O"5555";
  130. CHARPOS = 12;
  131. #
  132.   LOOP ONCE FOR EACH HEX DIGIT TO CONVERT TO HEX DISPLAY CODE
  133. #
  134. FOR NUMPOS = 0 STEP 4 UNTIL 56
  135. DO # CONVERT WORD TO HEX DISPLAY #
  136. BEGIN
  137. #
  138.   MASK OFF HEX DIGITS AND CHECK IF GREATER THAN 9. IF SO,
  139.   CONVERT TO HEX LETTER (A - F) BY SUBTRACTING 9. IF NOT,
  140.   CONVERT TO DISPLAY CODE BY ADDING 33B TO FORM DISPLAY CODE
  141.   EQUIVALENCE. SINCE EACH HEX DIGIT (4 BITS) BECOMES A CHAR
  142.   (6 BITS) ONE AND A HALF WORDS ARE REQUIRED TO HOLD THE DISPLAY
  143.   CODE DATA.
  144. #
  145. HEXCHAR = B<NUMPOS,4>OCTWD[0];
  146. IF HEXCHAR GR 9
  147. THEN # NEED TO CONVERT TO LETTER #
  148. BEGIN
  149. B<CHARPOS,6>WDMSG[MSGNO] = HEXCHAR - 9; # CONVERT TO DC #
  150. END
  151. ELSE # NEED TO CONVERT TO DISPLAY COD#
  152. BEGIN
  153. B<CHARPOS,6>WDMSG[MSGNO] = HEXCHAR + 27; # CONVERT TO DC #
  154. END
  155. IF CHARPOS EQ 54
  156. THEN # FIRST WORD HAS BEEN FILLED UP #
  157. BEGIN
  158. CHARPOS = 0; # INIT FOR 2ND WORD OF TRAPMSG #
  159. MSGNO = MSGNO + 1; # UPDATE TO POINT TO SECOND WORD#
  160. END
  161. ELSE # FIRST WORD NOT FILLED YET #
  162. BEGIN
  163. CHARPOS = CHARPOS + 6; # UPDATE PTR FOR INSERTING CHAR #
  164. END
  165. END
  166. #
  167.   DISPLAY CONTENTS OF WORD (IN OCTAL AND HEX)
  168. #
  169. OMSG(TRAPMSG,0); # ISSUE DAYFILE MESSAGE #
  170. END
  171. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  172. END
  173. TERM
cdc/nos2.source/nam5871/odayfl.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator