cdc:nos2.source:nam5871:np_8tin
Table of Contents
NP$8TIN
Table Of Contents
- [00012] PROC NP$8TIN(NPASCWD,INTVALUE)
Source Code
- NP$8TIN.txt
- *DECK NP$8TIN
- *IF,DEF,XFR
- USETEXT NX$ACBF
- USETEXT AIPDEF
- USETEXT HEADER
- USETEXT NP$STAT
- USETEXT NP$DB
- USETEXT NP$NWL
- USETEXT NP$MODE
- USETEXT NP$GETS
- USETEXT NX$ACBX
- PROC NP$8TIN(NPASCWD,INTVALUE);
- BEGIN
- #
- **
- * 1. PROC NAME AUTHOR DATE
- *
- * NP$8TIN Y. C. YIP 02/16/1984
- *
- * 2. FUNCTIONAL DESCRIPTION.
- *
- * NP$8TIN PICKS UP THE DD VALUE IN ASCII REPRESENTATION
- * AND RETURN THE INTEGER VALUE OF THE CHECKMARK TO INTVALUE.
- *
- * 3. METHOD USED.
- *
- * NP$8TIN LOOPS AROUND THE DD FIELDS STARTING FROM THE
- * LAST DD FIELD. IT PICKS UP THE ASCII VALUE, SUBTRACT
- * ASCII VALUE 0 FROM IT TO GET THE ACTUAL NUMERICAL VALUE
- * WORD OFFSET OF THE CURRENT PRU. DBIT IS ONLY USED BY THE
- * RESULT TO IT.
- *
- * 4. ENTRY CONDITIONS:
- *
- * NPASCWD = WORD CONTAINING THE DD
- * INTVALUE = RETURN PARAMETER
- *
- *
- * 5. EXIT CONDITIONS:
- *
- * INTVALUE HAS THE CHECKMARK NUMBER.
- * NPASCWD IS UNCHANGED
- #
- #
- ****
- #
- XREF
- BEGIN
- END
- #
- ****
- #
- ITEM NPASCWD; # WORD CONTAINING THE ASCII DD#
- ITEM INTVALUE; # PARAMETER THAT RETURNS THE #
- ITEM TEMP; # INTEGER TEMPORARY #
- ITEM EXPONENT; # POWER OF TEN #
- ITEM INDEX; # LOOP INDEX #
- CONTROL EJECT;
- #
- ************************************************************************
- * *
- * CODE OF NP$8TIN BEGINS HERE *
- * *
- ************************************************************************
- #
- EXPONENT = 1; # START WITH 1 #
- INTVALUE = 0; # INTIALIZE INTVALUE #
- FOR INDEX = DDEND STEP -BYTE$SIZE UNTIL DDSTART
- DO
- BEGIN
- TEMP = B<INDEX,BYTE$SIZE>NPASCWD; # GET THE ASCII VALUE #
- TEMP = TEMP - ASCII$ZERO;
- TEMP = TEMP*EXPONENT; # CALCULATE CHECKMARK VALUE #
- INTVALUE = TEMP + INTVALUE;
- EXPONENT = EXPONENT*10;
- END
- RETURN; # RETURN TO CALLER #
- END # END OF PROC NP$8TIN #
- TERM
- *ENDIF
cdc/nos2.source/nam5871/np_8tin.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator