U3HXBIN

Table Of Contents
  • [00004] HEXADECIMAL TO BINARY CONVERSION
u3hxbin.lst
ASM1130 CROSS ASSEMBLER V1.22 -- V2M12 -- Sun Nov  1 19:25:09 2020
 
Source File: \u3hxbin.asm 
HEXADECIMAL TO BINARY CONVERSION
 
                             2 | *************************************************** U3D00020
                             3 | *                                                 * U3D00030
                             4 | *   SUBROUTINE NAME-                              * U3D00040
                             5 | *      FULL NAME- HEXADECIMAL TO BINARY CON-      * U3D00050
                             6 | *         VERSION SUBROUTINE.                     * U3D00060
                             7 | *      CODE NAME- HXBIN                           * U3D00070
                             8 | *   PURPOSE- THIS SUBROUTINE CONVERTS A FOUR-     * U3D00080
                             9 | *      CHARACTER HEXADECIMAL NUMBER IN EBCDIC     * U3D00090
                            10 | *      TO ITS ONE-WORD BINARY EQUIVALENT.         * U3D00100
                            11 | *   METHOD-                                       * U3D00110
                            12 | *         SEE IBM 1130 SUBROUTINE LIBRARY MANUAL  * U3D00120
                            13 | *   CAPABILITIES AND LIMITATIONS-                 * U3D00130
                            14 | *         SEE IBM 1130 SUBROUTINE LIBRARY MANUAL  * U3D00140
                            15 | *   SPECIAL FEATURES- N/A                         * U3D00150
                            16 | *   ADDITIONAL INFORMATION-                       * U3D00160
                            17 | *      ESTIMATED EXECUTION TIME-                  * U3D00170
                            18 | *         SEE IBM 1130 SUBROUTINE LIBRARY MANUAL  * U3D00180
                            19 | *                                                 * U3D00190
                            20 | *************************************************** U3D00200
HEXADECIMAL TO BINARY CONVERSION
 
                            22 |       LIBR                                          U3D00220
                            23 |       ENT     HXBIN                                 U3D00230
0000 6928                   24 | HXBIN STX   1 C24+1     CALL ENTRY POINT            U3D00240
0001 6580 0000              25 | LINK  LDX  I1 0         LOADER STORED TV ADDR       U3D00250
0003 6A27                   26 |       STX   2 C26+1     SAVE XR2                    U3D00260
0004 2820                   27 |       STS     C20       SAVE STATUS                 U3D00270
0005 D83A                   28 |       STD     TEMP      SAVE ACC AND EXTENSION      U3D00280
0006 C100                   29 |       LD    1 0         XR1=ADDR OF INPUT PARAM     U3D00290
0007 8031                   30 |       A       D0003     INCR TO REF LAST CHAR       U3D00300
0008 D003                   31 |       STO     C15+1                                 U3D00310
0009 7101                   32 |       MDX   1 +1        SET UP RETURN ADDR          U3D00320
000A 6922                   33 |       STX   1 C28+1                                 U3D00330
000B 6500 0000              34 | C15   LDX  L1 0         XR1= IOAR +3                U3D00340
000D C02C                   35 |       LD      D0004     SET COUNT FOR 4 DIGITS      U3D00350
000E D029                   36 |       STO     COUNT                                 U3D00360
                            37 | *                                                   U3D00370
                            38 | *LOOP TO CONVERT HEXADECIMAL DIGITS                 U3D00380
                            39 | *                                                   U3D00390
000F C100                   40 | C16   LD    1 0         OBTAIN HOLLERITH DIGIT      U3D00400
0010 4C28 002ER             41 |       BSC  L  C40,Z+    TEST FOR ALPHA DIGIT        U3D00410
0012 E02A                   42 |       AND     H400F     IF NUMERIC, GO SET ERROR    U3D00420
0013 4C20 0036R             43 |       BSC  L  C42,Z     INDR IF BITS 1,12-15 ON     U3D00430
0015 C100                   44 |       LD    1 0         WHICH ROW BIT IS SET        U3D00440
0016 620C                   45 | C17   LDX   2 12                                    U3D00450
0017 1240                   46 |       SLCA  2 0         XR2=10 IF 0 ROW,1 IF 9,ETC  U3D00460
0018 9026                   47 |       S       H8000     ERROR IF MULTIPLE ROWS      U3D00470
0019 4C20 0036R             48 |       BSC  L  C42,Z     OR IF NO BITS SET.          U3D00480
001B 6A24                   49 |       STX   2 TEMP                                  U3D00490
001C C01F                   50 |       LD      D0010     10-(XR2) = ROW BIT SET      U3D00500
001D 9022                   51 |       S       TEMP                                  U3D00510
001E 4801                   52 |       BSC     O         IS DIGIT ALPHA              U3D00520
001F 801B                   53 |       A       D0009     YES, ADD +9 TO ROW          U3D00530
0020 1884                   54 |       SRT     4         ST BINARY DIGIT IN EXT      U3D00540
0021 71FF                   55 |       MDX   1 -1        ARE 4 DIGITS DONE YET       U3D00550
0022 74FF 0038R             56 |       MDX  L  COUNT,-1                              U3D00560
0024 70EA                   57 |       MDX     C16       NO,DO NEXT HEX CHAR         U3D00570
0025 2000                   58 | C20   LDS     0         YES, RESTORE STATUS         U3D00580
0026 C01A                   59 | C22   LD      TEMP+1    PUT BINARY IN ACC AND       U3D00590
0027 18D0                   60 |       RTE     16        RESTORE EXTENSION.          U3D00600
0028 6500 0000              61 | C24   LDX  L1 *-*       RESTORE XR1                 U3D00610
002A 6600 0000              62 | C26   LDX  L2 *-*       RESTORE XR1                 U3D00620
002C 4C00 0000              63 | C28   BSC  L  0         EXIT                        U3D00630
                            64 | *                                                   U3D00640
                            65 | *SECTION TO TREAT ALPHA CHARACTERS                  U3D00650
                            66 | *                                                   U3D00660
002E 2001                   67 | C40   LDS     1         SET ALPHA DIGIT INDR        U3D00670
002F C100                   68 |       LD    1 0                                     U3D00680
0030 E00D                   69 |       AND     H607F     ERROR IF 11,0,7,8,9 ROW     U3D00690
0031 4C20 0036R             70 |       BSC  L  C42,Z     OR BITS 12-15 SET           U3D00700
0033 C100                   71 |       LD    1 0                                     U3D00710
0034 F00A                   72 |       EOR     H8000     MASK OUT 12 ROW BIT         U3D00720
0035 70E0                   73 |       MDX     C17       GO DO NORMAL CONVERSION     U3D00730
0036 2001                   74 | C42   LDS     1         SET ERROR INDR (OVERFLOW ON U3D00740
0037 70EE                   75 |       MDX     C22       AND CARRY OFF)              U3D00750
                            76 | *                                                   U3D00760
                            77 | *CONSTANTS AND BUFFER AREA                          U3D00770
                            78 | *                                                   U3D00780
0038 0000                   79 | COUNT DC      0         FOUR-CHAR COUNT BUFFER      U3D00790
0039 0003                   80 | D0003 DC      +3        DECIMAL NUMBERS FOR SCALING U3D00800
003A 0004                   81 | D0004 DC      +4        ROW BIT VALUE.              U3D00810
003B 0009                   82 | D0009 DC      +9        SCALING DIGIT               U3D00820
003C 000A                   83 | D0010 DC      +10       SCALING DIGIT               U3D00830
003D 400F                   84 | H400F DC      /400F     MASK FOR BITS 1,12-15       U3D00840
003E 607F                   85 | H607F DC      /607F     MASK FOR BITS 11,0,7,8,9,   U3D00850
003F 8000                   86 | H8000 DC      /8000     12-15 SIGN BIT MASK         U3D00860
0040                        87 | TEMP  BSS  E  2         TEMPORARY STG. SAVE EXT     U3D00870
0042                        88 |       END                                           U3D00880
 
There were no errors in this assembly
 
=== CROSS REFERENCES ==========================================================
Name  Val   Defd  Referenced
C15   000BR   34   31
C16   000FR   40   57
C17   0016R   45   73
C20   0025R   58   27
C22   0026R   59   75
C24   0028R   61   24
C26   002AR   62   26
C28   002CR   63   33
C40   002ER   67   41
C42   0036R   74   43   48   70
COUNT 0038R   79   36   56
D0003 0039R   80   30
D0004 003AR   81   35
D0009 003BR   82   53
D0010 003CR   83   50
H400F 003DR   84   42
H607F 003ER   85   69
H8000 003FR   86   47   72
HXBIN 0000R   24
LINK  0001R   25
TEMP  0040R   87   28   49   51   59