ASM1130 CROSS ASSEMBLER V1.22 -- V2M12 -- Sun Nov 1 19:25:10 2020
Source File: \u4decbi.asm
TWO-WORD DECIMAL TO BINARY CONVERSION
2 | *************************************************** U4H00020
3 | * * U4H00030
4 | * STATUS - VERSION 2, MODIFICATION 8 U4H00035
5 | * SUBROUTINE NAME- * U4H00040
6 | * FULL NAME- DECIMAL TO BINARY TWO-WORD * U4H00050
7 | * INTEGER CONVERSION ROUTINE. * U4H00060
8 | * CODE NAME- DECBI * U4H00070
9 | * PURPOSE- THIS SUBROUTINE CONVERTS A DECIMAL * U4H00080
10 | * INTEGER EXPRESSED AS ONE TO TEN DIGITS * U4H00090
11 | * PLUS A SIGN IN UNPACKED HOLLERITH,TO A TWO-* U4H00100
12 | * WORD BINARY INTEGER. * U4H00110
13 | * METHOD- * U4H00120
14 | * SEE IBM 1130 SUBROUTINE LIBRARY MANUAL * U4H00130
15 | * CAPABILITIES AND LIMITATIONS- * U4H00140
16 | * SEE IBM 1130 SUBROUTINE LIBRARY MANUAL * U4H00150
17 | * SPECIAL FEATURES-N/A * U4H00160
18 | * ADDITIONAL INFORMATION- * U4H00170
19 | * ESTIMATED EXECUTION TIME- * U4H00180
20 | * SEE IBM 1130 SUBROUTINE LIBRARY MANUAL * U4H00190
21 | * * U4H00200
22 | *************************************************** U4H00210
TWO-WORD DECIMAL TO BINARY CONVERSION
24 | LIBR U4H00230
25 | ENT DECBI U4H00240
0000 6952 26 | DECBI STX 1 SAV1+1 SAVE XR1 U4H00250
0001 6580 0000 27 | LDX I1 *-* RECORD ENTRY U4H00260
0003 284C 28 | STS DB055 SAVE AND RESET STATUS U4H00270
0004 6A50 29 | STX 2 SAV2+1 SAVE XR2 U4H00280
30 | * U4H00290
0005 C100 31 | LD 1 0 U4H00300
0006 D00A 32 | STO DB000+1 SET UP ADDR OF SIGN U4H00310
0007 805C 33 | A ONE AND U4H00320
0008 D01E 34 | STO DB030+1 SET UP INPUT BUFFER ADDR U4H00330
35 | * U4H00340
0009 7101 36 | MDX 1 +1 U4H00350
000A C580 0000 37 | LD I1 0 FETCH WORD CNT U4H00360
000C 1001 38 | SLA 1 DOUBLE WORD COUNT U4H00370
000D D016 39 | STO DB020+1 SET UP WORD COUNT U4H00380
000E 7101 40 | MDX 1 1 2-8 U4H00381
000F 6947 41 | STX 1 DB060+1 SET UP FOR EXIT 2-8 U4H00382
42 | * U4H00390
0010 C400 0000 43 | DB000 LD L *-* FETCH SIGN U4H00400
0012 D053 44 | STO SIGN INITIAL TO NEG U4H00410
45 | * U4H00420
0013 4C18 001ER 46 | BSC L DB010,+- GO TO SET PLUS ON ZERO U4H00430
47 | * U4H00440
0015 9048 48 | S H4000 U4H00450
0016 4C18 0020R 49 | BSC L DB010+2,+- GO TO CONT ON MINUS U4H00460
50 | * U4H00470
0018 9045 51 | S H4000 U4H00480
0019 4C18 001ER 52 | BSC L DB010,+- GO SET PLUS ON AMPERSAND U4H00490
53 | * U4H00500
001B 9043 54 | S H00A0 U4H00510
001C 4C20 005CR 55 | BSC L DB070,Z GO TO ERROR - INVALID SIGN U4H00520
56 | * U4H00530
001E 1010 57 | DB010 SLA 16 SET SIGN U4H00540
001F D046 58 | STO SIGN TO PLUS. U4H00550
59 | * U4H00560
60 | * U4H00570
61 | * STATEMENTS REMOVED 2-8 U4H00590
62 | * U4H00600
0020 10A0 63 | SLT 32 U4H00610
0021 D83E 64 | STD BIBFR INITIAL BINARY BFR, WD SW U4H00620
0022 2000 65 | LDS 0 CLEAR OVERFLOW,CARRY 2-8 U4H00621
66 | * U4H00630
0023 6500 0000 67 | DB020 LDX L1 *-* INITIAL FOR ADD LOOP AND U4H00640
0025 620C 68 | LDX 2 +12 SHIFTS. U4H00650
69 | * U4H00660
0026 C400 0000 70 | DB030 LD L *-* FETCH WORD U4H00670
71 | * U4H00680
0028 188E 72 | SRT 14 CHECK ZONE BITS U4H00690
0029 4C20 005CR 73 | BSC L DB070,Z GO TO ERROR IF NON-ZERO U4H00700
002B 108E 74 | SLT 14 RESTORE WORD U4H00710
002C 7401 0027R 75 | MDX L DB030+1,+1 INCRE INPUT ADDR U4H00720
002E 4C18 003ER 76 | BSC L DB040,+- BR IF CHAR IS BLANK U4H00730
77 | * U4H00740
0030 1240 78 | SLCA 2 0 BIT POSITION TO XR2 U4H00750
0031 1001 79 | SLA 1 SHIFT OUT BIT U4H00760
0032 4C20 005CR 80 | BSC L DB070,Z BR TO ERROR IF MULTI-BITS U4H00770
0034 72F6 81 | MDX 2 -10 SUB 9 TO GET NEG BIN VALUE U4H00780
0035 1000 82 | NOP U4H00790
83 | * U4H00800
0036 6A2E 84 | STX 2 TEMP SET TO TAKE THE U4H00810
0037 1010 85 | SLA 16 COMPLEMENT OF NEG TO GET U4H00820
0038 902C 86 | S TEMP ACTUAL BINARY VALUE U4H00830
0039 D02B 87 | STO TEMP U4H00840
88 | * U4H00850
003A 6680 0065R 89 | LDX I2 TEMP ACTUAL BIN VALUE TO XR2 U4H00860
90 | * U4H00870
003C 7200 91 | MDX 2 0 IS ACTUAL VALUE ZERO U4H00880
003D 7003 92 | MDX DB045 NO, GO TO CONTINUE U4H00890
93 | * U4H00900
003E 71FE 94 | DB040 MDX 1 -2 YES, DECR WORD COUNT U4H00910
003F 70E5 95 | MDX DB030-1 GO TO LOAD NEXT WRD U4H00920
0040 7007 96 | MDX DB050 WD CNT ZERO - GO TO EXIT U4H00930
97 | * U4H00940
0041 C81E 98 | DB045 LDD BIBFR FETCH BINARY BUFFER U4H00950
0042 8D00 0066R 99 | AD L1 TABLE-2 ADD APPROP POWER OF TEN U4H00960
0044 72FF 100 | MDX 2 -1 DECR BINARY NUMBER U4H00970
0045 70FC 101 | MDX DB045+1 LOOP TIL NUMBER = ZERO U4H00980
102 | * U4H00990
0046 D819 103 | STD BIBFR RESULT TO BUFFER U4H01000
0047 70F6 104 | MDX DB040 GO TO CHK WORD COUNT U4H01010
105 | * U4H01020
0048 4801 106 | DB050 BSC O CHECK OVERFLOW U4H01030
0049 700E 107 | MDX DB065 POSSIBLE ERROR IF ON U4H01040
108 | * U4H01050
004A C01B 109 | LD SIGN U4H01060
004B 4818 110 | BSC +- SKIP ON NON-ZERO U4H01070
111 | * U4H01080
004C 7003 112 | MDX DB055 BR ON POSITIVE U4H01090
113 | * U4H01100
004D 10A0 114 | SLT 32 CLEAR ACC AND EXT U4H01110
004E 9811 115 | SD BIBFR TAKE 2'S COMPLEMENT U4H01120
004F 7002 116 | MDX SAV1 SKIP TO EXIT U4H01130
117 | * U4H01140
0050 2000 118 | DB055 LDS *-* RESTORE STATUS U4H01150
0051 C80E 119 | LDD BIBFR RESTORE ACC AND EXT U4H01160
120 | * * U4H01170
0052 6500 0000 121 | SAV1 LDX L1 *-* RESTORE XR1 U4H01180
0054 6600 0000 122 | SAV2 LDX L2 *-* RESTORE XR2 U4H01190
123 | * U4H01200
124 | * U4H01210
0056 4C00 0000 125 | DB060 BSC L *-* RETURN TO CALLER U4H01220
126 | * U4H01230
0058 F009 127 | DB065 EOR MAXNG CHECK FOR MAX NEG VALUE U4H01240
0059 4C20 005CR 128 | BSC L DB070,Z GO TO ERROR ON NOT MAX NEG U4H01250
005B 70EE 129 | MDX DB050+2 OVERFLOW OK, GO TO EXIT U4H01260
130 | * * U4H01270
131 | * ERROR TRAP * U4H01280
005C 2001 132 | DB070 LDS 1 SET OVFLO ON, CARRY OFF U4H01290
005D 70F3 133 | MDX DB055+1 GO TO EXIT U4H01300
134 | * U4H01310
135 | * U4H01320
005E 4000 136 | H4000 DC /4000 MINUS U4H01330
005F 00A0 137 | H00A0 DC /00A0 RT HALF OF PLUS U4H01340
138 | * U4H01350
0060 0000 0000 139 | BIBFR DEC 0 WORKING BFR FOR BINARY NO. U4H01360
0062 8000 140 | MAXNG DC /8000 MAXIMUM NEGATIVE U4H01370
0063 0000 141 | DC 0 VALUE U4H01380
142 | * U4H01390
0064 0001 143 | ONE DC 1 U4H01400
0065 0000 144 | TEMP DC 0 STORAGE FOR NEG BIN VALUE U4H01410
0066 0000 145 | SIGN DC 0 STORAGE FOR SIGN U4H01420
146 | * U4H01430
147 | * FOLLOWING IS A BINARY TABLE OF THE * U4H01440
148 | * POWERS OF 10 FROM 0 TO 9. * U4H01450
0068 0000 0001 149 | TABLE DEC 1.0B31 U4H01460
006A 0000 000A 150 | DEC 10.0B31 U4H01470
006C 0000 0064 151 | DEC 100.0B31 U4H01480
006E 0000 03E8 152 | DEC 1000.0B31 U4H01490
0070 0000 2710 153 | DEC 10000.0B31 U4H01500
0072 0001 86A0 154 | DEC 100000.0B31 U4H01510
0074 000F 4240 155 | DEC 1000000.0B31 U4H01520
0076 0098 9680 156 | DEC 10000000.0B31 U4H01530
0078 05F5 E100 157 | DEC 100000000.0B31 U4H01540
007A 3B9A CA00 158 | DEC 1000000000.0B31 U4H01550
007C 159 | END U4H01560
There were no errors in this assembly
=== CROSS REFERENCES ==========================================================
Name Val Defd Referenced
BIBFR 0060R 139 64 98 103 115 119
DB000 0010R 43 32
DB010 001ER 57 46 49 52
DB020 0023R 67 39
DB030 0026R 70 34 75 95
DB040 003ER 94 76 104
DB045 0041R 98 92 101
DB050 0048R 106 96 129
DB055 0050R 118 28 112 133
DB060 0056R 125 41
DB065 0058R 127 107
DB070 005CR 132 55 73 80 128
DECBI 0000R 26
H00A0 005FR 137 54
H4000 005ER 136 48 51
MAXNG 0062R 140 127
ONE 0064R 143 33
SAV1 0052R 121 26 116
SAV2 0054R 122 29
SIGN 0066R 145 44 58 109
TABLE 0068R 149 99
TEMP 0065R 144 84 86 87 89