ASM1130 CROSS ASSEMBLER V1.22 -- V2M12 -- Sun Nov 1 19:25:10 2020
Source File: \u4dcbin.asm
DECIMAL TO BINARY CONVERSION
2 | *************************************************** U4G00020
3 | * * U4G00030
4 | * SUBROUTINE NAME- * U4G00040
5 | * FULL NAME- DECIMAL TO BINARY CONVERSION * U4G00050
6 | * SUBROUTINE. * U4G00060
7 | * CODE NAME- DCBIN * U4G00070
8 | * PURPOSE- THIS SUBROUTINE CONVERTS A SIGNED * U4G00080
9 | * FIVE DIGIT DECIMAL NUMBER,REPRESENTED BY * U4G00090
10 | * SIX EBCDIC CHARACTERS, TO ITS ONE WORD * U4G00100
11 | * BINARY EQUIVALENT. * U4G00110
12 | * METHOD- * U4G00120
13 | * SEE IBM 1130 SUBROUTINE LIBRARY MANUAL * U4G00130
14 | * CAPABILITIES AND LIMITATIONS- * U4G00140
15 | * SEE IBM 1130 SUBROUTINE LIBRARY MANUAL * U4G00150
16 | * SPECIAL FEATURES- N/A * U4G00160
17 | * ADDITIONAL INFORMATION- * U4G00170
18 | * ESTIMATED EXECUTION TIME- * U4G00180
19 | * SEE IBM 1130 SUBROUTINE LIBRARY MANUAL * U4G00190
20 | * * U4G00200
21 | *************************************************** U4G00210
DECIMAL TO BINARY CONVERSION
23 | LIBR U4G00230
24 | ENT DCBIN U4G00240
0000 6936 25 | DCBIN STX 1 F24+1 CALL ENTRY POINT U4G00250
0001 6580 0000 26 | LINK LDX I1 0 LOADER STORED TV ADDRESS U4G00260
0003 6A35 27 | STX 2 F26+1 SAVE XR2 U4G00270
0004 282F 28 | STS F20 SAVE STATUS U4G00280
0005 D850 29 | STD TEMP SAVE ACC AND EXTENSION U4G00290
0006 C100 30 | LD 1 0 XR1= ADDR OF INPUT PARAM U4G00300
0007 D003 31 | STO F15+1 U4G00310
0008 7101 32 | MDX 1 +1 XR1= RETURN ADDR U4G00320
0009 6931 33 | STX 1 F28+1 U4G00330
000A 6500 0001 34 | F15 LDX L1 1 XR1= INPUT AREA ADDR U4G00340
000C C040 35 | LD D0005 U4G00350
000D D03E 36 | STO COUNT SET COUNT FOR 5 DIGITS U4G00360
000E 1810 37 | SRA 16 U4G00370
000F D046 38 | STO TEMP CLEAR OUTPUT REGISTER U4G00380
0010 C101 39 | F17 LD 1 1 OBTAIN HOLLERITH DIGIT U4G00390
0011 4C18 001FR 40 | BSC L F17A,+- DON'T CONVERT IF BLANK U4G00400
0013 E03F 41 | AND HC00F CHK BITS 0,1,12-15 U4G00410
0014 4C20 0032R 42 | BSC L F19,Z IF ILLEGAL CHAR, EXIT WITH U4G00420
43 | * OVFLO INDR SET. U4G00430
0016 C101 44 | LD 1 1 WHICH ROW BIT IS SET U4G00440
0017 620C 45 | LDX 2 12 U4G00450
0018 1240 46 | SLCA 2 0 XR2= 10 IF 0 ROW,1 IF 9,ETC U4G00460
0019 9038 47 | S H8000 U4G00470
001A 4C20 0032R 48 | BSC L F19,Z EXIT IF NONE OR MANY U4G00480
49 | * ROW BITS SET U4G00490
001C 6A37 50 | STX 2 ROW COMPUTE 10-(XR2) TO GET U4G00500
001D C030 51 | LD D0010 BINARY EQUIVALENT OF U4G00510
001E 9035 52 | S ROW HOLLERITH DIGIT U4G00520
53 | * U4G00530
54 | *COMPUTE BINARY EQUIVALENT FROM DIGITS. U4G00540
55 | * U4G00550
001F 8036 56 | F17A A TEMP ADD PREVIOUS RESULT U4G00560
0020 74FF 004CR 57 | MDX L COUNT,-1 ARE 5 DIGITS DONE YET U4G00570
0022 701C 58 | MDX F42 NO,GO MPY BY 10 U4G00580
0023 D032 59 | STO TEMP YES,STORE FINAL VALUE U4G00590
0024 4C01 0046R 60 | BSC L F44,O MAY BE ERROR IF OVERFLOW U4G00600
0026 C1FC 61 | LD 1 -4 GET SIGN WORD U4G00610
0027 4C18 0034R 62 | BSC L F20,+- SIGN = BLANK U4G00620
0029 9027 63 | S H4000 U4G00630
002A 4C18 003CR 64 | BSC L F40,+- SIGN = MINUS U4G00640
002C 9024 65 | S H4000 U4G00650
002D 4C18 0034R 66 | BSC L F20,+- SIGN = AMPERSAND U4G00660
002F 9020 67 | S H00A0 U4G00670
0030 4C18 0034R 68 | F18 BSC L F20,+- SIGN = PLUS U4G00680
0032 2001 69 | F19 LDS 1 ERROR - SET OVFLO ON U4G00690
0033 7001 70 | MDX F22 AND CARRY OFF U4G00700
0034 2000 71 | F20 LDS 0 RESTORE STATUS U4G00710
0035 C820 72 | F22 LDD TEMP RESTORE ACC AND EXTENSION U4G00720
0036 6500 0000 73 | F24 LDX L1 0 RESTORE XR1 U4G00730
0038 6600 0000 74 | F26 LDX L2 0 RESTORE XR2 U4G00740
003A 4C00 0000 75 | F28 BSC L 0 EXIT U4G00750
76 | * U4G00760
77 | *SECTION TO COMPLEMENT IF MINUS, MPY BY 10, CHECK U4G00770
78 | *FOR -32768 U4G00780
79 | * U4G00790
003C 9019 80 | F40 S TEMP MINUS SIGN, SO COMPLEMENT U4G00800
003D D018 81 | STO TEMP FINAL VALUE U4G00810
003E 70F5 82 | MDX F20 U4G00820
003F A00F 83 | F42 M H0014 MPY BY 10 SCALED -1 U4G00830
0040 4C20 0032R 84 | BSC L F19,Z ERROR IF OVER +32760 U4G00840
0042 108F 85 | SLT 15 PUT PRODUCT IN A REG U4G00850
0043 D012 86 | STO TEMP SAVE INTERMEDIATE RESULT U4G00860
0044 7101 87 | MDX 1 +1 SET XR1 TO GET NEXT DIGIT U4G00870
0045 70CA 88 | MDX F17 RET TO REPEAT LOOP U4G00880
0046 F00B 89 | F44 EOR H8000 IS VALUE -32768 U4G00890
0047 4C20 0032R 90 | BSC L F19,Z NO, IS ERROR U4G00900
0049 C1FC 91 | LD 1 -4 U4G00910
004A F006 92 | EOR H4000 YES, DON'T COMPLIMENT U4G00920
004B 70E4 93 | MDX F18 U4G00930
94 | * U4G00940
95 | *CONSTANTS AND BUFFER AREA U4G00950
96 | * U4G00960
004C 0000 97 | COUNT DC 0 COUNTER FOR 5 DIGITS U4G00970
004D 0005 98 | D0005 DC +5 DECIMAL 5 U4G00980
004E 000A 99 | D0010 DC +10 DECIMAL 10 U4G00990
004F 0014 100 | H0014 DC /0014 10 SCALED -1 U4G01000
0050 00A0 101 | H00A0 DC /00A0 AMPERSAND CHECK U4G01010
0051 4000 102 | H4000 DC /4000 BLANK OR MINUS CHECK U4G01020
0052 8000 103 | H8000 DC /8000 MAX NEG NUMBER U4G01030
0053 C00F 104 | HC00F DC /C00F CHECK ILLEGAL CODE BITS U4G01040
0054 0000 105 | ROW DC 0 TEMPORARY STORAGE FOR DIGIT U4G01050
0056 106 | TEMP BSS E 2 SAVE ACC AND EXT U4G01060
0058 107 | END U4G01070
There were no errors in this assembly
=== CROSS REFERENCES ==========================================================
Name Val Defd Referenced
COUNT 004CR 97 36 57
D0005 004DR 98 35
D0010 004ER 99 51
DCBIN 0000R 25
F15 000AR 34 31
F17 0010R 39 88
F17A 001FR 56 40
F18 0030R 68 93
F19 0032R 69 42 48 84 90
F20 0034R 71 28 62 66 68 82
F22 0035R 72 70
F24 0036R 73 25
F26 0038R 74 27
F28 003AR 75 33
F40 003CR 80 64
F42 003FR 83 58
F44 0046R 89 60
H0014 004FR 100 83
H00A0 0050R 101 67
H4000 0051R 102 63 65 92
H8000 0052R 103 47 89
HC00F 0053R 104 41
LINK 0001R 26
ROW 0054R 105 50 52
TEMP 0056R 106 29 38 56 59 72 80 81 86