*DECK ODAYFL USETEXT NIPDEF USETEXT PARAMS PRGM ODAYFL; # DISPLAY CONTENTS OF NIP-S MEM # STARTIMS; # *1DC ODAYFL * * 1. PROC NAME AUTHOR DATE * ODAYFL E. GEE 86/09/25 * * 2. FUNCTIONAL DESCRIPTION. * DISPLAY THE CONTENTS OF NIP-S MEMORY IN OCTAL AND HEX. * * 3. METHOD USED. * LOOP FOR EACH WORD TO BE DISPLAYED IN NAM DAYFILE. * CONVERT CONTENTS OF WORD TO OCTAL DISPLAY. * CONVERT CONTENTS OF WORD TO HEX DISPLAY. * CALL OMSG TO DAYFILE THE DISPLAYED CONTENTS. * * 4. ENTRY PARAMETERS. * PARAMS1 FWA TO DISPLAY CONTENTS OF * PARAMS2 NO OF WORDS TO DISPLAY CONTENTS OF * * 5. EXIT PARAMETERS. * NONE * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * NIPDEF NIP CONSTANT DEFINITIONS * PARAMS COMMON BLOCK FOR PASSING PARAMETERS TO * AND FROM SECONDARY OVERLAYS. * * 7. ROUTINES AND OVERLAYS CALLED. * OMSG ISSUE DAYFILE MESSAGE * XTRACE RECORD PROCEDURE CALLS * * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION. * * THIS PROGRAM IS A SECONDARY OVERLAY LOADED BY SUBROUTINE * OVLCALL. WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO * LOCATION RJMAIN TO RETURN TO THE CALLING PROGRAM. * * * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY * OVERLAY BUFFER SIZE MINUS 5 (443B WORDS). * * THIS OVERLAY IS CALLED BY HPRUSM, NGIGO, AND NLOPIP. * # STOPIMS; # EXTERNAL VARIABLES # XREF BEGIN PROC OMSG; # ISSUE DAYFILE MESSAGE # PROC XTRACE; # RECORD PROCEDURE CALLS # LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL # END # INTERNAL VARIABLES # # ARRAY TO HOLD DISPLAY CODE DATA TO DAYFILE # ARRAY TRAPMSG[0:3] S(1); BEGIN ITEM WDMSG C(0,0,10); ITEM ENDMSG U(0,42,18) = [,,,0]; END # TEMPLATE OF WORD TO DISPLAY # BASED ARRAY OCTMSG P(1); ITEM OCTWD U(0,0,60); ITEM ADDR; # FWA OF WORD TO DISPLAY # ITEM CHARPOS; # NEXT POSITION TO INSERT CHA # ITEM HEXCHAR; # HEX DIGIT TO BE DISPLAYED # ITEM MSGNO; # CURRENT WORD IN DAY MSG BUFFER# ITEM NUM; # NUMBER OF WORDS TO DISPLAY # ITEM NUMPOS; # NEXT POSITION TO PICK UP NO # ITEM TEMP2; # COUNTER FOR WORD TO DISPLAY # #**********************************************************************# BEGIN CONTROL IFEQ DEBUG,1; XTRACE("DAYFL") ; # TRACE PROCEDURE CALL # CONTROL FI; ADDR = PARAMS1; # FWA TO DISPLAY CONTENTS OF # NUM = PARAMS2; # NUMBER OF WORD TO DISPLAY # # LOOP ONCE FOR EACH WORD TO DISPLAY CONTENTS OF WORD # FOR TEMP2 = 0 STEP 1 UNTIL NUM-1 DO BEGIN P = ADDR + TEMP2; # ADDR OF WORD TO DISPLAY # CHARPOS = 0; MSGNO = 0; NUMPOS = 0; # LOOP ONCE FOR EACH OCTAL DIGIT TO CONVERT TO OCTAL DISPLAY CODE # FOR NUMPOS = 0 STEP 3 UNTIL 57 DO BEGIN # MASK OFF OCTAL DIGIT AND ADD 33B TO FORM DISPLAY CODE # # EQUIVALENCE. SINCE EACH OCTAL DIGIT (3 BITS) BECOMES A CHAR # # (6 BITS) TWO WORDS ARE REQUIRED TO HOLD THE DISPLAY CODE DATA# BWDMSG[MSGNO] = BOCTWD[0] + O"33"; IF CHARPOS EQ 54 THEN # FIRST WORD HAS BEEN FILLED UP # BEGIN CHARPOS = 0; # INIT FOR 2ND WORD OF TRAPMSG # MSGNO = MSGNO + 1; # UPDATE TO POINT TO SECOND WORD# END ELSE # FIRST WORD NOT FILLED YET # BEGIN CHARPOS = CHARPOS + 6; # UPDATE PTR FOR INSERTING CHAR # END END # INSERT 2 BLANKS BETWEEN OCTAL AND HEX DISPLAY # B<0,12>WDMSG[MSGNO] = O"5555"; CHARPOS = 12; # LOOP ONCE FOR EACH HEX DIGIT TO CONVERT TO HEX DISPLAY CODE # FOR NUMPOS = 0 STEP 4 UNTIL 56 DO # CONVERT WORD TO HEX DISPLAY # BEGIN # MASK OFF HEX DIGITS AND CHECK IF GREATER THAN 9. IF SO, CONVERT TO HEX LETTER (A - F) BY SUBTRACTING 9. IF NOT, CONVERT TO DISPLAY CODE BY ADDING 33B TO FORM DISPLAY CODE EQUIVALENCE. SINCE EACH HEX DIGIT (4 BITS) BECOMES A CHAR (6 BITS) ONE AND A HALF WORDS ARE REQUIRED TO HOLD THE DISPLAY CODE DATA. # HEXCHAR = BOCTWD[0]; IF HEXCHAR GR 9 THEN # NEED TO CONVERT TO LETTER # BEGIN BWDMSG[MSGNO] = HEXCHAR - 9; # CONVERT TO DC # END ELSE # NEED TO CONVERT TO DISPLAY COD# BEGIN BWDMSG[MSGNO] = HEXCHAR + 27; # CONVERT TO DC # END IF CHARPOS EQ 54 THEN # FIRST WORD HAS BEEN FILLED UP # BEGIN CHARPOS = 0; # INIT FOR 2ND WORD OF TRAPMSG # MSGNO = MSGNO + 1; # UPDATE TO POINT TO SECOND WORD# END ELSE # FIRST WORD NOT FILLED YET # BEGIN CHARPOS = CHARPOS + 6; # UPDATE PTR FOR INSERTING CHAR # END END # DISPLAY CONTENTS OF WORD (IN OCTAL AND HEX) # OMSG(TRAPMSG,0); # ISSUE DAYFILE MESSAGE # END GOTO RJMAIN; # RETURN TO CALLING PROGRAM # END TERM