1130 Commercial Subroutine Package - All about the IBM 1130 ...
1130 Commercial Subroutine Package - All about the IBM 1130 ...
1130 Commercial Subroutine Package - All about the IBM 1130 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
A3A1Format: CALL A3A1(JCARD, J, JLAST, KCARD, K, ICHAR)Function: To convert from A3 format (three characters per word) as created by <strong>the</strong>A1A3 subroutine to Al format (one character per word).Parameter description:JCARD – The name of a one-dimensional integer array defined in a DIMENSIONstatement. This array contains <strong>the</strong> field to be converted. Originally,this field must be in A3 format, three characters per word.J - An integer constant, an integer expression, or an integer variable.This is <strong>the</strong> position of <strong>the</strong> first element of JCARD to be converted (<strong>the</strong>left-hand end of a field).JLAST - An integer constant, an integer expression, or an integer variable.This is <strong>the</strong> position of <strong>the</strong> last element of JCARD to be converted (<strong>the</strong>right-hand end of a field).KCARD - The name of a one-dimensional integer array defined in a DIMENSIONstatement. This is <strong>the</strong> array into which <strong>the</strong> data is converted, in Alformat, one character per word.KAn integer constant, an integer expression, or an integer variable.This is <strong>the</strong> position of <strong>the</strong> first element of KCARD to receive <strong>the</strong> convertedcharacters (<strong>the</strong> left-hand end of a field).ICHAR - The name of a one-dimensional integer array defined in a DIMENSIONstatement. This array contains a table used in <strong>the</strong> conversion.Detailed description: A3 integers are taken, one at a time, from <strong>the</strong> JCARD array. Eachis decoded into <strong>the</strong> three numbers of which it is composed, as follows:ADDA1A3A1DECA3A1CARRYDECA1DIVDPACKDUNPKEDITFILLGETICOMPIONDKEYBDMOVEMPYNCOMPNSIGNNZONEPACKPRINTPUNCHPUTP1403P1442READR2501SKIPSTACKSUBS1403TYPERUNPACWHOLEN1={ (A3 INTEGER/1600) + 20 if <strong>the</strong> A3 integer is positive((A3 INTEGER + 32000)/1600) if <strong>the</strong> A3 integer is negative }N2=(A3 INTEGER-(N1-20)*1600)/40N3=A3 INTEGER-(N1-20)*1600-(N2*40)The resulting integers, N1, N2, N3, are <strong>the</strong>n used to locate <strong>the</strong>ir corresponding Alcharacters in <strong>the</strong> ICHAR array. Each Al character is <strong>the</strong>n placed in <strong>the</strong> KCARD array.Note that each element of JCARD requires three elements in KCARD.