cdc:nos2.source:nam5871:dldisde
Table of Contents
DLDISDE
Table Of Contents
- [00003] PROC DLDISDE(BINAR, REXTENT, RESULT)
Source Code
- DLDISDE.txt
- *DECK DLDISDE
- USETEXT DLFPDEF
- PROC DLDISDE(BINAR, REXTENT, RESULT);# CONVERT BINARY TO DISPLAY #
- *IF DEF,IMS
- #
- *1DC DLDISDE
- *
- * 1. PROC NAME AUTHOR DATE
- * DLDISDE P.C.TAM 78/10/05
- *
- * 2. FUNCTIONAL DESCRIPTION.
- * CONVERT BINARY TO DISPLAY DECIMAL.
- *
- * 3. METHOD USED.
- * ADD 33B TO EACH DIGIT TO CONVERT IT INTO DISPLAY CODE
- *
- * 4. ENTRY PARAMETERS.
- * BINAR BINARY NUMBER TO BE CONVERTED
- * REXTENT NO OF DIGITS NEEDED (MUST BE LQ 10)
- *
- * 5. EXIT PARAMETERS.
- * RESULT CALCULATED RESULT
- *
- * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
- * DLFPDEF
- *
- * 7. ROUTINES CALLED.
- * NONE.
- *
- * 8. DAYFILE MESSAGES.
- * NONE.
- *
- #
- *ENDIF
- #
- EXTERNAL VARIABLES
- #
- #
- INTERNAL VARIABLES
- #
- ITEM
- BINAR I, # BINARY NO TO BE CONVERTED #
- REXTENT I, # LENGTH OF FIELD #
- RESULT C(WC), # RESULT #
- TEMP1 I, # TEMPORARY VARIABLE #
- TEMP2 I, # TEMPORARY VARIABLE #
- TEMP9 C(WC), # TEMPORARY VARIABLE #
- I I; # TEMPORARY VARIABLE #
- # ******************************************************************** #
- BEGIN
- TEMP1 = BINAR;
- FOR I = 0 STEP 1 UNTIL WC - 1
- DO
- BEGIN
- TEMP2 = TEMP1 / 10;
- B<54 - I * CL, CL> TEMP9 = TEMP1 - TEMP2 * 10 + O"33";
- TEMP1 = TEMP2;
- END
- RESULT = C<WC - REXTENT, REXTENT>TEMP9;
- END
- TERM
cdc/nos2.source/nam5871/dldisde.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator