10.07.2015 Views

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 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ADDA1A3A1DECA3A1CARRYDECA1-4---DIVDPACKDUNPKEDITFILLGETICOMPIONDKEYBDMOVEMPYNCOMPNSIGNNZONEPACKPRINTPUNCHPUTP1403P1442READR2501SKIPSTACKSUB51403TYPERUNPACWHOLEDECALFormat: CALL DECA1(JCARD,J,JLAST,NER)Function: Converts a field from decimal format, right-justified, one digit per word, toAl format, one character per word.Parameter description:JCARD - The name of a one-dimensional integer array defined in a DIMENSIONstatement. This is <strong>the</strong> name of <strong>the</strong> field that will be converted. Originally,this field must be in decimal format, one digit per word.J - An integer constant, an integer expression, or an integer variable.This is <strong>the</strong> position of <strong>the</strong> first digit 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,greater than or equal to J. This is <strong>the</strong> position of <strong>the</strong> last characterof JCARD to be converted (<strong>the</strong> right-hand end of a field).NER - An integer variable. This variable will be equal to <strong>the</strong> position of <strong>the</strong>last digit of JCARD which was negative or greater than 9, except for <strong>the</strong>JLAST position, which can be negative (sign).Detailed description: The subroutine operates from left to right. First <strong>the</strong> sign is determined.Then each digit, starting with JCARD(J), is converted to Al format using <strong>the</strong>formulaCharacter = 256 * (decimal digit) - 4032When all digits have been converted, <strong>the</strong> field is signed. More detailed informationmay be found in <strong>the</strong> DECAL flowchart and listing.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!