cdc:nos2.source:nam5871:ns_cda
Table of Contents
NS$CDA
Table Of Contents
- [00002] FUNC NS$CDA(CHAR)U
- [00004] NS$CDA - CONVERT DISPLAY CODE CHARACTER TO ASCII.
- [00008] CONVERT DISPLAY CODE CHARACTER TO ASCII.
- [00035] PROC NS$DBG
Source Code
- NS$CDA.txt
- *DECK NS$CDA
- FUNC NS$CDA(CHAR)U; # CONVERT DISPLAY CODE CHARACTER TO ASCII #
- # TITLE NS$CDA - CONVERT DISPLAY CODE CHARACTER TO ASCII. #
- BEGIN # NS$CDA #
- #
- ** NS$CDA - CONVERT DISPLAY CODE CHARACTER TO ASCII.
- *
- * J.C. LEE 1981
- *
- * THIS IS A UTILITY FUNCTION SUBPROGRAM. ITS FUNCTION IS TO
- * CONVERT DISPLAY CODE CHARACTER TO ASCII.
- *
- * FUNC NS$CDA(CHAR)
- *
- * ENTRY:
- * CHAR = 6-BIT DISPLAY CODE CHARACTER TO BE CONVERTED.
- *
- * EXIT:
- * NONE.
- *
- * METHOD:
- * USE DISPLAY CODE CHARACTER TO INDEX INTO THE 7-BIT
- * ASCII CONVERSION TABLE WHICH IS INITIALIZED FOR
- * CDC 64-CHARACTER SET.
- *
- #
- ITEM CHAR U; # DISPLAY CODE CHARACTER #
- $BEGIN
- XREF
- BEGIN
- PROC NS$DBG; # TRACE PROCEDURE CALL #
- END
- $END
- ITEM I U; # WORD INDEX INTO CONVERSION TABLE #
- ITEM J U; # BIT INDEX INTO CONVERSION TABLE WORD #
- #
- DISPLAY CODE TO 7-BIT ASCII CHARACTER CONVERSION TABLE -
- INDEXABLE BY DISPLAY CODE AND INITIALIZED FOR CDC 64
- CHARACTER SET.
- #
- DEF L$ASCIITAB # 8 #; # SIZE OF CONVERSION TABLE #
- ARRAY ASCIITAB [0:7] S(1);
- BEGIN
- ITEM ASCIIC7 U(00,00,60) =
- [O"35203024161105432160",
- O"44223124563115472360",
- O"50243225165125532560",
- O"54263323014262315500",
- O"32554673416253265240",
- O"27520512217240261340",
- O"21667352250537205140",
- O"23576743720134571660"];
- END
- CONTROL EJECT;
- $BEGIN
- NS$DBG("CDA");
- $END
- I = CHAR / L$ASCIITAB; # WORD INDEX INTO ASCIITAB #
- J = (CHAR - I*L$ASCIITAB) * 7; # BIT INDEX INTO ASCIITAB WORD #
- NS$CDA = B<J,7>ASCIIC7[I]; # RETURN ASCII CHARACTER #
- RETURN;
- END # NS$CDA #
- TERM
cdc/nos2.source/nam5871/ns_cda.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator