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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example: DIMENSION MPLR(5),MCAND(15)N=0CALL MPY(MPLR,1,5,MCAND,6,15,N)Before:MPLR 00982 MCAND ABCDE0007136673PositionAfter:N=01 5lPosition 1 5 10 15MPLR is unchanged.N=0MCAND 000007008212886Position 1 5 10 15The numeric data fields MPLR, and MCAND are multiplied, <strong>the</strong> result being placed inMCAND. Note that <strong>the</strong> MCAND field has been extended to <strong>the</strong> left <strong>the</strong> length of <strong>the</strong>MPLR field, five positions, and that N has not been changed.Errors: If <strong>the</strong>re is not enough room to extend <strong>the</strong> KCARD field to <strong>the</strong> left, NER will beset equal to KLAST, and <strong>the</strong> routine will terminate.Remarks: Conversion from EBCDIC to decimal is necessary before using this subroutine.This may be accomplished with <strong>the</strong> A1DEC subroutine. The length of <strong>the</strong> JCARD andKCARD fields is arbitrary, up to <strong>the</strong> maximum space available.The arithmetic performed is decimal arithmetic, using whole numbers only.Space must always be provided in <strong>the</strong> KCARD field for expansion. The first position of<strong>the</strong> multiplicand, K, must be at least JLAST-J+1 positions from <strong>the</strong> beginning ofKCARD. For example, if JCARD is 7 positions, 1 through 7, <strong>the</strong>n <strong>the</strong> multiplicand,in KCARD, must start at least seven positions (7-1+1=7) from <strong>the</strong> beginning of KCARD.This would have K equal to 8.The product, located in <strong>the</strong> KCARD field, will begin at position K-(JLAST-J+1) ofKCARD, and end at position KLAST of KCARD.-53-1,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111.111111111 HMI

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

Saved successfully!

Ooh no, something went wrong!