cdc:nos2.source:nam5871:dlconvt
Table of Contents
DLCONVT
Table Of Contents
Source Code
- DLCONVT.txt
- *DECK DLCONVT
- IDENT DLCONVT
- ENTRY DLCONVT
- *IF DEF,IMS
- *#
- *1DC DLCONVT
- *
- * 1. PROC NAME AUTHOR DATE
- * DLCONVT P.C.TAM 78/09/27
- *
- * 2. FUNCTIONAL DESCRIPTION.
- * CONVERT NUMERIC DISPLAY CODE FIELD TO BINARY
- *
- * 3. METHOD USED.
- * SELECT EACH DIGIT, CHECK IF NUMERIC, CONVERT TO BINARY
- *
- * 4. ENTRY PARAMETERS.
- * (A1) ADDRESS OF THE ADDRESS OF DISPLAY WORD
- * (A1)+1 ADDRESS OF THE ADDRESS OF RESULT
- * (A1)+2 ADDRESS OF THE ADDRESS OF THE COMPLETE FLAG
- *
- * 5. EXIT PARAMETERS.
- * SAME AS 4.
- *
- * 6. COMMON DECKS CALLED.
- * MACDEF CYBERDEFS
- *
- * 7. ROUTINES CALLED.
- * NONE.
- *
- * 8. DAYFILE MESSAGES.
- * NONE.
- *#
- *ENDIF
- *CALL MACDEF
- *CALL CYBERDEFS
- DLCONVT SUBR = ENTRY/EXIT
- MX0 -CL
- SA2 X1 (X2)=WORD TO BE CONVERTED
- SB1 1
- SB2 NC
- MX7 0
- * LOOP TO CONVERT EACH DIGIT
- CONV1 BSS 0
- LX2 CL MASK OUT DIGIT
- BX3 -X0*X2
- ZR X3,CONEN
- SX5 X3-33B TEST NUMERIC
- MI X5,CONER
- SX6 X3-44B-1
- PL X6,CONER
- BX6 X7 (X7)=(X7)*10
- LX7 3
- IX6 X6+X6
- IX7 X7+X6
- IX7 X5+X7 ADD IN CURRENT DIGIT
- SB2 B2-B1
- NZ B2,CONV1
- * END OF LOOP
- CONEN BSS 0
- SA4 A1+B1 WRITE BINARY RESULT BACK
- SX6 B1 WRITE CONVERT OK FLAG
- SA7 X4
- EQ CONV2
- * ERROR PROCESSING
- CONER BSS 0
- MX6 0
- CONV2 BSS 0
- SA4 A1+2
- SA6 X4
- EQ DLCONVTX RETURN
- END
cdc/nos2.source/nam5871/dlconvt.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator