User Tools

Site Tools


ibm:ibm1130-lib:dmsr2v12:u4binhx_lst

U4BINHX

Table Of Contents
  • [00004] BINARY TO HEXADECIMAL CONVERSION
u4binhx.lst
ASM1130 CROSS ASSEMBLER V1.22 -- V2M12 -- Sun Nov  1 19:25:09 2020
 
Source File: \u4binhx.asm 
BINARY TO HEXADECIMAL CONVERSION
 
                             2 | ***   HDNG    LIBF BINHX-V1.                        U4C00020
                             3 | *************************************************** U4C00030
                             4 | *                                                 * U4C00040
                             5 | *   SUBROUTINE NAME-                              * U4C00050
                             6 | *      FULL NAME- BINARY TO HEXADECIMAL CONVERSION* U4C00060
                             7 | *         SUBPROGRAM.                             * U4C00070
                             8 | *      CODE NAME-BINHX                            * U4C00080
                             9 | *   PURPOSE- THIS SUBPROGRAM CONVERTS A SINGLE    * U4C00090
                            10 | *      WORD BINARY CONFIGURATION TO ITS 4-CHAR    * U4C00100
                            11 | *      HEXADECIMAL EQUIVALENT.                    * U4C00110
                            12 | *   METHOD- THE INPUT WORD IS PUT IN THE EXTENSION* U4C00120
                            13 | *      AND SHIFTED 4 BITS AT A TIME INTO THE ACC. * U4C00130
                            14 | *      BINARY 9 IS SUBTRACTED FROM THE 4 BITS TO  * U4C00140
                            15 | *      DETERMINE IF IT IS NUMERIC OR ALPHA. A     * U4C00150
                            16 | *      SHIFT IS GENERATED IN EITHER CASE TO       * U4C00160
                            17 | *      CONSTRUCT THE HOLLERITH EQUIVALENT.        * U4C00170
                            18 | *   CAPABILITIES AND LIMITATIONS- INPUT CAN BE ANY* U4C00180
                            19 | *      SINGLE BINARY WORD.                        * U4C00190
                            20 | *   SPECIAL FEATURES- N/A                         * U4C00200
                            21 | *   ADDITIONAL INFORMATION-                       * U4C00210
                            22 | *      ESTIMATED EXECUTION TIME-                  * U4C00220
                            23 | *************************************************** U4C00230
BINARY TO HEXADECIMAL CONVERSION
 
                            25 |       LIBR                                          U4C00250
                            26 |       ENT     BINHX                                 U4C00260
                            27 | *                                                   U4C00270
0000 691E                   28 | BINHX STX   1 B33+1     CALL ENTRY POINT            U4C00280
0001 6580 0000              29 | LINK  LDX  I1 *-*       TV LINK WORD                U4C00290
0003 D826                   30 |       STD     TEMPA     SAVE ACC AND EXT            U4C00300
0004 281B                   31 |       STS     B35       SAVE STATUS                 U4C00310
0005 C100                   32 |       LD    1 0         XR1= ADDR OUTPUT PARAM      U4C00320
0006 D012                   33 |       STO     B26+1     ST OUTPUT ADDR              U4C00330
0007 7101                   34 |       MDX   1 +1        OBTAIN RET ADDR AND         U4C00340
0008 691A                   35 |       STX   1 B37+1     SET UP RET                  U4C00350
0009 6104                   36 |       LDX   1 +4        SET XR1 TO COUNT 4 DIGITS   U4C00360
                            37 | *                                                   U4C00370
                            38 | *LOOP TO GET HEXADECIMAL DIGIT                      U4C00380
                            39 | *                                                   U4C00390
000A C01F                   40 |       LD      TEMPA     PUT VALUE IN EXTENSION      U4C00400
000B 18D0                   41 |       RTE     16                                    U4C00410
000C 1810                   42 | B20   SRA     16        CLEAR ACCUMULATOR           U4C00420
000D 1084                   43 |       SLT     4         4-BIT CHARACTER             U4C00430
000E 9017                   44 |       S       D0009     IS DIGIT ALPHABETIC         U4C00440
000F 4C30 0024R             45 |       BSC  L  B40,Z-    YES, GO SET OVERFLOW INDR   U4C00450
0011 8014                   46 |       A       D0009     NO,RESTORE 9 TO NUMERIC     U4C00460
0012 8016                   47 | B22   A       SHIFT     SET UP SHIFT INSTRUCTION    U4C00470
0013 D001                   48 |       STO     B24                                   U4C00480
0014 C013                   49 |       LD      H2000     ROW 0 BIT SET               U4C00490
0015 1800                   50 | B24   SRA     0         SET ROW BIT FOR DIGIT       U4C00500
0016 4801                   51 |       BSC     O         IS CHAR ALPHA               U4C00510
0017 800F                   52 |       A       H8000     YES, ADD ROW 12 BIT         U4C00520
0018 D400 0000              53 | B26   STO  L  0         STORE CHAR IN OUTPUT AREA   U4C00530
001A 7401 0019R             54 |       MDX  L  B26+1,+1  SET FOR NEXT OUTPUT WORD    U4C00540
001C 71FF                   55 | B30   MDX   1 -1        ARE 4 DIGITS DONE YET       U4C00550
001D 70EE                   56 |       MDX     B20       NO, GET NEXT CHAR           U4C00560
001E 6500 0000              57 | B33   LDX  L1 *-*       YES, RESTORE XR1 AND XR2    U4C00570
0020 2000                   58 | B35   LDS     *-*       RESTORE STATUS              U4C00580
0021 C808                   59 |       LDD     TEMPA     RESTORE ACC AND EXTENSION   U4C00590
0022 4C00 0000              60 | B37   BSC  L  0         EXIT                        U4C00600
0024 2001                   61 | B40   LDS     1         SET OVERFLOW INDR IF        U4C00610
0025 70EC                   62 |       MDX     B22       THE CHAR IS ALPHA           U4C00620
                            63 | *                                                   U4C00630
                            64 | *CONSTANTS AND BUFFER AREA                          U4C00640
                            65 | *                                                   U4C00650
0026 0009                   66 | D0009 DC      +9        DECIMAL 9                   U4C00660
0027 8000                   67 | H8000 DC      /8000     ROW 12 BIT                  U4C00670
0028 2000                   68 | H2000 DC      /2000     ROW 0 BIT                   U4C00680
0029 1800                   69 | SHIFT SRA     0         SHIFT CONSTANT              U4C00690
002A                        70 | TEMPA BSS  E  2         ACC AND EXT TEMPORARY       U4C00700
002C                        71 |       END                                           U4C00710
 
There were no errors in this assembly
 
=== CROSS REFERENCES ==========================================================
Name  Val   Defd  Referenced
B20   000CR   42   56
B22   0012R   47   62
B24   0015R   50   48
B26   0018R   53   33   54
B30   001CR   55
B33   001ER   57   28
B35   0020R   58   31
B37   0022R   60   35
B40   0024R   61   45
BINHX 0000R   28
D0009 0026R   66   44   46
H2000 0028R   68   49
H8000 0027R   67   52
LINK  0001R   29
SHIFT 0029R   69   47
TEMPA 002AR   70   30   40   59
ibm/ibm1130-lib/dmsr2v12/u4binhx_lst.txt ยท Last modified: 2023/08/06 13:34 by Site Administrator