QB151             0                    1                     2                     3                     4                     5                     6                     7                     8                     9

                     This prog performs Edit, Edit and Mark. It determines               S1=0=source addr invalid                                          S6=0=RO new source digit
                     whether to use EBCDIC or ASCII zones and reads out                  S1=1=source addr valid                                            S6=1=use lo source digit
A                    pattern characters to determine if they are control                 S3=0=lo 4 bits of source are a digit                              S7=0=significance stat off
                     characters or not. It also reads out source                         S3=1=lo 4 bits of source are a sign                               S7=1=significance stat on
                     characters as required and tests the lo 4 bits for signs.           S3 also stores carry out of J reg                                 UV=source addr
                                                                                         S4=0=source digit not zero                                        IJ=dest(pattern) addr
                                                                                         S4=1=source digit=zero                                            L=length of pattern field
                                                                                         S5=0=not signif start char                                        DH=ASCII or EBCDIC zone bits
B                                                                                        S5=1=signif start char                                             T=fill character
                                                                                         S4-S5 also used for char decode
                                                    00 ---  7FC
                                                K 1011,1      |
                                                A 0+0+1>G     |
C                                           ----S *8B      LS S*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------QB031------CBE
                                            |   |             |                                                                                                                                                                        (00,01,10,11)
                                            |   C          007V                                                                                                                                                                        Set cond reg
                                            |   R S2,S7     80R
                                            |   C2--    ** --CB
                                            |  Set G7=1 to
D                                           |  avoid minuz
                                            |  zero correction
                              10 --- 0832   |       10 --- 07FE           00 ---  7F4           10 ---  7F6           00 ---  7F8
                          K 0111,0      |   |   |             |       K 0010        |       K 0011        |       |             |
                          A I+0+C>IC    |   |   |             |       A R=KH+1>Z    |       A RL-KL+1>Z   |       A J+0+1>JC    |
E   QB161.GFE------------*S         K>W R*--O---S IJ>MN    MS S*------S WRITE       |*------|             |*--O---S IJ>MN    MS S-O----------------------------------------------------------------------------------------
    (10)                  |             |       |             |       C HZ>S4,LZ>S5 |       C 0>S4,S5     |   |   |             | |                                                                                       |
    Update I              C          007V       C          007V ------C          007V       C          007V   |   C          007V |                     - Control characters -                                            |
                          R AC,0      FCR       R 0,0       F4R |     R 1,0       F6R       R S4,S5     F8R   |   R 1,S7      4AR |                     20=digit select                                                   |
                          E1--    *0 --EA       E2--    00 --EB |     E3--    10 --EC       E4--    ** --ED   |   E5--    1* --EE |                     21=signif start                                                   |
                                               No pattern       |    Test hi bits=2        Test lo bits       |  Not ctrl char    |                     22=field separator                                                |
F                                              character        |    and lo bits=0         less than 3        |                   |                                                                                       |
                                                                | ---------------------------------------------                   |                                                                                       |
                                                    01 ---  7FD | |       01 ---  7F9                                             |                                                                           11 ---  77B |
                                                K 0101        | | |   |             |                                             |                                                                       |             | |
                                                A 0+KH>D      | | |   A J+0+1>JC    |                                             |                                                                       A J+0+1>JC    | |
G   QA761.LEE-------------------------------O--*|             |*O O---S IJ>MN    MS S*---------------------------------------------                                                                       S IJ>MN    MS S-O
    (01,11)                                 |   |             | | |   |             |                                                                                                                     |             | |
    Edits                                   |   C          007V | |   C          007V   ------------------------------------------------------------------------------------------------------------------C          007V |
                                            |   R 0,S7      F4R | |   R 1,S7      4AR   |                                                                                                                 R 1,S7      4BR |
                                            |   G2--    0* --GB | |   G3--    1* --GC   |                                                                                                                 G9--    1* --GJ |
                                            |  ASCII            | |  Not ctrl char      |                                                                                                                Not ctrl char    |
H                                           |                   | |                     |                                                                                                                                 |
                                            |                   | |                     |                                                                                                                                 |
                                            |       11 ---  7FF | |       10 ---  7FA   |       01 --- 779.           00 --- 083C                                                                             11 --- 082B |
                                            |   K 1111        | | |   |             |   |   K 1000,0      |       |             |                                                                         K 0111,0      | |
                                            |   A 0+KH>D      | | |   A RL-0>Z      |   |   |             |       A J+0+1>JC    |                                                                         A T>R         | |
J   QB161.QHE-------------------------------O---|             |-O O---|             |*--O---S         K>W R*--O---S IJ>MN    MS S*------------------------------------------------------------------------S         K>W R-O------------QB161------GCE
    (01,11)                                     |             | | |   |             |       |             |   |   C 0>S7        |                                                                         C 0>S2        |              (10,11)
    Store zone                                  C          007V | |   C          007V       C          007V   |   C          007V                                                                         C          007V              Leave char or
    in D                                        R 0,S7      F4R | |   R AC,1      79R       R 0,Z=0     3CR   |   R 1,1       2BR                                                                         R 1,1       4CR              store fill
                                                J2--    0* --JB | |   J3--    *1 --JC       J4--    0* --JD   |   J5--    11 --JE                                                                         J9--    1* --JJ
                                               EBCDIC           | |  Test lo bits=1        Field sep or       |  Field sep                                                                               Store fill
K                                                               | |                        signif start       |                                                                                          char
                                                                | |                                           |
                                                                | |                                           |       01 --- 083D                                                                             11 ---  727
                                                                | |                                           |   K 0111,0      |                                                                         |             |
                                                                | |                                           |   A GXH>G       |                                                                         A 0>ZC        |
L                                                               | |                                           ----S         K>W R*----------------------O-------------------------------------------------S IJ>MN    MS S*-------------QB161------LJE
                                                                | |                                               C HZ>S4,LZ>S5 |                       |                                                 C 0>S6        |              (00,01,10,11)
                                                                | |                                               C          007V                       |                                                 C          007V              Store lo
                                                                | |                                               R S6,1      25R                       |                                                 R S4,S7     4CR              result bits
                                                                | |                                               L5--    *1 --LE                       |                                                 L9--    ** --LJ
                                                                | |                                              Signif start Set S5=1                  |
M                                                               | |                                             test if hi bits=0                       |                                             ---------------------------------QB161------NHE
                                                                | |                     -----------------------------------------------------------------                                             |
                                                                | |       11 ---  7FB   |       01 ---  725           11 --- 07F3                                 00 --- 0740           01 ---  73D   |       10 --- 0746
                                                                | |   |             |   |   |             |       |             |                             K 0110        |       K 0110        |   |   K 0111,0      |
                                                                | |   A GXH>G       |   |   A V+0+1>V     |       A R>G         |                             A GH+KH>Z     |       A GXH+KH>ZC   |   |   A 0+KL>L      |  
N                                                               | ----|             |---O---S UV>MN    MS S*--O---S WRITE       |*--O-------------------------|             |*------|             |*--O---|             |*-
                                                                |     C HZ>S4       |       C 1>S6        |   |   C HZ>S4       |   |                         |             |       |             |       C 0>S6        | |
                                                                |     C          007V       C          007V   |   C          007V   |                   ------C          007V       C          007V       C          007V |
                                                                |     R S6,1      25R       R S1,1      F1R   |   R AC,0      40R   |                   |     R 0,1       3DR       R AC,0      44R       R 1,CA01>W  47R |
                                                                |     N3--    *1 --NC       N4--    *1 --ND   |   N5--    *0 --NE   |                   |     N7--    01 --NG       N8--    *0 --NH       N9--    11 --NJ |
                                                                |    Digit select          No source char     |  Test hibits=0      |                   |    Test for digit        Test for sign         Invalid data     |
P                                                               |    Test hibits=0                            |  Store source       |                   |    in hi bits            in lo bits                             |
                                                                |                                             |  char in G          |                   |                          S3=1=sign                              |
                                                                |                                             |       01 --- 07F1   |       10 --- 0742 |                                                     11 ---  XXX |
                                                                |                                             |   K 0101,0      |   |   |             | |                                                 | Go to       | |
                                                                |                                             |   A 0+KL>L      |   |   A U+0+1>U     | |                                                 | QA879.CAE   | |
Q                                                               |                                             ----S WRITE       |   ----|             |*-                                           ------|             | |
                                                                |                                                 C 0>S6        |       |             |                                             |     |             | |
                                                                |                                                 C          007V--     C          007V                                             |     |             | |
                                                                |                                                 R 1,CA01>W  47R |     R 0,0       40R                                             |     |             | |
                                                                |                                                 Q5--    11 --QE |     Q6--    00 --QF                                             |     Q9--    11 --QJ |
                                                                |                                                Inv addr         |                                                                 |    Prg Int          |
                                                                |                                                                 |                                                                 |                     |
                                                                |                                                                 ------------------------------------------------------------------O----------------------
                                                                |                                                                 
                                                                -----------------------------------------------------------------------------------------------------------------------------------------------------------------------QB161------GBE
                                                                                                                                                                                                                                       (01)
S                                                                                                                                                                                                                                      Continue edit

 Q
 B
 1
 5                                                                                                                                                | 128015        09/27/65 | Mach          2030       | Date  11/17/65          Sheet    1  QB151 |
 1                                                                                                                                                | 128045        11/17/65 | Name                     | Log    3564             Version    007    |
                                                                                                                                                  |                        | Mode          Manual     |                                           |
                                                                                                                                                  |                        | P.N.          837088     |    Edit, Edit and Mark                    |
                                                                                                                                                  |                        | IBM Corp.                |                                           |