QB061             0                    1                     2                     3                     4                     5                     6                     7                     8                     9

                                                                                                                                                                                                              10 --- 03E2
                         This page tests for the inv op which occurs if G6=1.                                The hi order byte is always located in addr                                                  K 1000        |
                         It then directs the prg to the first page of the                                    F8 and E8. THe fields extend to the right                                                    A G!KL>G      |    
A                        dec add/sub prog where the signs and lo order digits                                as required, depending upon the field length                                             ----S WRITE       |*-------------QA081------AJE
                         are examined. The prg will then branch back to this                                 As these copies are made, the data is checked                                            |   |             |              (01)
                         page where length checks are made to be sure that                                   for zero and for being valid decimal digits.                                             |   C          007V              Set Inv Op
                         L1 is greater than L2 and that L2 is less than 8.                                                                                                                            |   R 0,1       7DR
                         A straight copy of the div/plier field with the sign                                                                                                                         |   A9--    01 --AJ
                         stripped out is then made in LS row F and a copy                                                                                                                             |  Inv Op-Restore
B                        skewed right 1 digit is made in LS row E                                                                                                                                     |  G4 (Ver 000)
                                                                                                                                                                                                      |
                                                                                                                                                                                        11 ---  37F   |       00 --- 03E0
                                                                                                                                                                                    K 1000        |   |   K 1011        |
                                                                                                                                                                                    A G.-KL>G     |   |   A RL-KL+1>Z   |    
C   QA081.NGE----------------------------------------------------------------------------------------------------------------------------------------------------------------------*S UV>MN    MS S*--O---S WRITE       |*-------------QB001------CJE
    (11)                                                                                                                                                                            |             |       C 0>S0        |              (00,01)
    Decimal                                                                                                                                                                         C          007V       C          007V              Mpy/Div
    Mpy/Div                                                                                                                                                                         R G6,0      E0R       R 0,R=VDD   64R              sign tests
                                                                                                                                                                                    C8--    *0 --CH       C9--    0* --CJ
                                                                                                                                                                                  Set G4=0 to           Test div/plier
D                                                                                                                                                                                 indicate Mpy/Div      sign byte for
                                                                                                                                                                                  G6=1.=Inv Op          ASCII minus sign
                                                                                                                                                                                  (Ver007)              (Ver 000)

E   QB001.EGE--------------------------------------------------------                                                                                                             All wds on this page are Ver 007
    (01)                                                            |
    Decimal Mpy          Decimal add/sub routine has tested         |
    Div prep             the signs and lo order digits of           |
                         both fields.                               |
                         S0=Quo/Prod sign (0=+, 1=-)                |
F                        S2=0                                       |                                                             ---------------------------------------------------------------------------------------------
                         S3=Carry from decrement of V               |                                                             |                                                                                           |
                         S4=1=Div/Plier is a 1 char field           |                           10 ---  78A           01 --- 078D |         11 ---  793           10 ---  792                                 01 ---  79D     |
                         S6=0                                       |                       |             |       K 0110,0      | |     K 1111        |       K 1000        |                             K 0110,0      |     |
                         S7=Dvd/Cand field sign which is            |                       A U-0>U       |       A 0+KL>L      | |     A T+KH>T      |       A G.-KH>G     |                             A 0+KL>L      |     |
G                           sign of the rem (0=+, 1=-_              |                   ----|             |*-     |             |*O     S STORE       |*------|             |*---                     ----S STORE       |*----O
                         D=Lo order div/plier char                  |                   |   |             | |     C 0>S6        | |     |             |       C 1>S6        |   |                     |   C 0>S6        |     |
                         L=L1,L2                                    |                   |   C          007V | ----C          007V | ----C          007V       C          007V   |                     |   C          007V     |
                         UV=Lo order div/plier addr with            |                   |   R 1,1       8BR | |   R 1,CA01>W  47R | |   R 1,0       92R       R 1,0       96R   |                     |   R 1,CA01>W  47R     |
                            V decremented by 1                      |                   |   G4--    11 --GD | |   G5--    11 --GE | |   G6--    10 --GF       G7--    10 --GG   |                     |   G9--    11 --GJ     |
                         IJ=Lo order Dvd/Cand addr                  |                   |                   | |  Spec CH-L2 is    | | Div/plier field=1 char  Set G0=0          |                     |  Spec CH-L1 not       |
H                                                                   |                   |                   | |  greater than 7   | | T=E8, S6=1 for divide 1st cycle           |                     |  greater than L2      |
                                                                    |                   | ------------------- |                   | |                                           |                     |                       |
                                                                    |     01 --- 081D   | |     11 --- 078B   |       00 ---  78C | |                             01 ---  791   |       10 ---  796   |       00 ---  79C     |
                                                                    | K 0111        |   | --|             |   |   |             | | |                         |             |   ----|             |   |   |             |     |
                                                                    | A LL-KL>TC    |   |   A LXH-LH+1>ZC |   |   A DH>R        | | |                         A T-0>T       |       A DXL>R       |   |   A LXL-LL+1>D  |     |
J                                                                   -*S         K>W R*--O---|             |*--O---S T>MN     LS S*+-O-------------------------S STORE       |*--O---S T>MN     LS S*--O---S STORE       |*----+--------QB071------JJE
                                                                      |             |       |             |       |             | |                           |             |   |   C ANSNZ>S2    |       |             |     |        (00,10)
                                                                      C          007V       C          007V       C          007V |                       ----C          007V   |   C          007V   ---*C          007V     |        Continue
                                                                      R 1,S3      8AR       R 0,S3      8CR       R S4,1      91R |                       |   R S6,0      94R   |   R 0,S3      9CR   |   R S0,0      50R     |        Mpy/Div prep
                                                                      J3--    1* --JC       J4--    0* --JD       J5--    *1 --JE |                       |   J7--    *0 --JG   |   J8--    0* --JH   |   J9--    *0 --JJ     |
                                                                     Test for L2 < 8       Test for L1           Store first      |                       |                     |  Store last skew    |  D=Signif Cand        |
K                                                                    Set T=lo order        greater than L2       straight char    |                       |                     |  char in LS E8      |  field length         |
                                                                     addr for straight     (L2-L1, carry =                        |                       |                     |                     |  (L1-L2)              |
                                                                     copy of div/plier     spec on)                   10 ---  78E |                       |                     |                     |                       |
                                                                     field to LS                                  K 0111,0      | |                       |                     |                     |                       |
                                                                     (Carry=spec on)                              A 0+KL>L      | |                       |                     |                     |                       |
L                                                                                                             ----S WRITE       |*-                       |                     |                     | -----------------------
                                                                                                              |   C 0>S6        |                         |                     |                     | |
                                                                                                              |   C          007V                         |                     |                     | |
                                                                                                              |   R 1,CA01>W  47R                         |                     |                     | |
                                                                                                              |   L5--    11 --LE                         |                     |                     | |
                                                                                                              |  Invalid data                             |                     |                     | |
M                                                                                                             |                                           |                     |                     | |
                                              ----------------------------------------------------------------+-------------------------------------------+----------------------                     | |
                                              |     00 ---  794           01 ---  795           10 ---  79A   |       11 ---  78F           11 ---  797   |       00 ---  790                         | |     11 ---  XXX
                                              --|             |       |             |       K 1111        |   |   K 1001        |       |             |   |   K 1110        |                         | | | Go to       |
                                                A V-0>V       |       A DXL+RH>D    |       A T+KH+1>T    |   |   A T^K>Z       |       A RXH+DL>R    |   |   A T+KL>T      |                         | | | QA879.CAE   |
N                                               S UV>MN    MS S*------S WRITE       |*O-----S T>MN     LS S*--O---S STORE       |*------S T>MN     LS S*--O---S STORE       |*---                     | --|             |
                                                C 1>S6        |       |             | |     |             |       C LZ>S5       |       C ANSNZ>S2    |       |             |   |                     |   |             |
                                            ----C          007V       C          007V | ----C          007V       C          007V       C          007V       C          007V   |                     |   |             |
                                            |   R 0,1       95R       R AC,0      98R | |   R 1,R=VDD   8ER       R 1,1       97R       R 0,S5      90R       R 0,0       94R   |                     |   |             |
                                            |   N2--    01 --NB       N3--    *0 --NC | |   N4--    1* --ND       N5--    11 --NE       N6--    0* --NF       N7--    00 --NG   |                     |   N9--    11 --NJ
                                            | RO next div/plier      D=skew digits    | |  Set TH=E,             Store straight        R=skewed byte         Store skewed       |                     |  Prg Int
P                                           | digits. Set S6=1                        | |  increment TL          char in LS F          Test for zero         char in LS E       |                     |
                                            | for divide 1st                          | ---------------------    row, test for                               row. Set TH=F      |                     |
                                            | cycle and to                            |         00 ---  798 |    TL=9                                        Decrement TL       |                     |
                                            | stop step J6 from                       |     |             | |                                                by 2               |                     |
                                            | returning to this                       |     A U-0>U       | |                                                                   |                     |
Q                                           | routine                                 ------|             |*-   The above routine stores the div/plier field                    |                     |
                                            |                                               |             |     staight in LS row F with the sign stripped out.                 |                     |
                                            |                                               C          007V     It also stores it skewed right 1 digit in                       |                     |
                                            |                                               R 1,0       9AR     row E. THe hi order byte is always located                      |                     |
                                            |                                               Q4--    10 --QD     in E8 and F8.                                                   |                     |
                                            |                                                                                                                                   |                     |
R                                           -------------------------------------------------------------------------------------------------------------------------------------                     |
                                                                                                                                                                                                      |
                                                                                                                                                                                                      |
    Q........------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

S

 Q
 B
 0
 6                                                                                                                                                | 128015        09/27/65 | Mach          2030       | Date  11/17/65          Sheet    1  QB061 |
 1                                                                                                                                                | 128045        11/17/65 | Name                     | Log    3564             Version    007    |
                                                                                                                                                  |                        | Mode          Manual     |                                           |
                                                                                                                                                  |                        | P.N.          837080     |    Decimal multiply/divide                |
                                                                                                                                                  |                        | IBM Corp.                |    Common prep                            |