ASM1130 CROSS ASSEMBLER V1.22 -- V2M12 -- Sun Nov 1 19:25:11 2020 Source File: \w1ebc48.asm 4OF8 - EBC AND EBC - 4OF8 CONVERSION 2 | *************************************************** W1A00020 3 | * TITLE - EBC48 * W1A00030 4 | * STATUS - CHANGE LEVEL 3 * W1A00040 5 | * FUNCTION/OPERATION - .EBC48. CONVERTS 4-OF-8 * W1A00050 6 | * CHARACTERS TO EBCDIC OR EBCDIC TO 4-OF-8 CODE, * W1A00060 7 | * DEPENDING ON THE VALUE OF THE CONTROL PARAMETER* W1A00070 8 | * ENTRY POINTS - .EBC48. CALL ENTRANCE LIBF EBC48 * W1A00080 9 | * INPUT - UNPACKED, LEFT-JUSTIFIED 4-OF-8 CODE * W1A00090 10 | * CHARACTERS OR PACKED EBCDIC CHARACTERS * W1A00100 11 | * OUTPUT - PACKED EBCDIC CHARACTERS OR UNPACKED, * W1A00110 12 | * LEFT-JUSTIFIED 4-OF-8 CODE CHARACTERS * W1A00120 13 | * EXTERNAL ROUTINES - .STRTB. TABLE OF 4-OF-8 CODE* W1A00130 14 | * AND EBCDIC CHARACTERS, .HXCV. ROUTINE TO * W1A00140 15 | * CONVERT 4-OF-8 CODE CHARACTER TO VALUE BETWEEN * W1A00150 16 | * ZERO AND 63. * W1A00160 17 | * EXITS-NORMAL - RETURN TO MAINLINE AT LIBF+5 * W1A00170 18 | * -ERROR - INVALID EBCDIC CHARACTER ON INPUT,* W1A00180 19 | * EXIT TO LIBF+5 AFTER CONVERSION IS COMPLETE * W1A00190 20 | * WITH CARRY OFF AND OVERFLOW ON. * W1A00200 21 | * TABLES/WORK AREAS - NONE * W1A00210 22 | * ATTRIBUTES - REUSABLE * W1A00220 23 | * NOTES - THE CALLING SEQUENCE IS * W1A00230 24 | * LIBF EBC48 * W1A00240 25 | * DC /000X CONTROL PARAMETER * W1A00250 26 | * DC INPUT INPUT AREA ADDRS * W1A00260 27 | * DC OTPUT OUTPUT AREA ADDRS * W1A00270 28 | * DC NNNN CHARACTER COUNT * W1A00280 29 | *************************************************** W1A00290 4OF8 - EBC AND EBC - 4OF8 CONVERSION 31 | LIBR W1A00310 32 | ENT EBC48 W1A00320 0000 6966 33 | EBC48 STX 1 SAV1+1 SAVE INDEX REGISTER 1 W1A00330 0001 6580 0000 34 | LDX I1 *-* ADDR FIRST PARAMETER W1A00340 0003 D86A 35 | STD AQ SAVE ACC AND EXTENSION W1A00350 0004 2865 36 | STS LDS SAVE STATUS W1A00360 0005 6917 37 | STX 1 MDX1+1 SAVE ADDR 1ST PARAMETER W1A00370 0006 C101 38 | LD 1 1 STORE INPUT BUFFER ADDRESS W1A00380 0007 D013 39 | STO INPUT+1 W1A00390 0008 C102 40 | LD 1 2 STORE OUTPUT BFR ADDRESS W1A00400 0009 D057 41 | STO OUTPT+1 W1A00410 000A C103 42 | LD 1 3 W1A00420 000B D064 43 | STO CT CNT OF CHARS TO CONVERT W1A00430 000C 7104 44 | MDX 1 4 SET RETURN ADDR TO USER W1A00440 000D 695F 45 | STX 1 XIT+1 PROGRAM. W1A00450 000E 6A5A 46 | STX 2 SAV2+1 SAVE USERS XR2 W1A00460 000F C061 47 | LD LIBF CONVERT LIBF STRTB INTO ACT W1A00470 0010 1088 48 | SLT 8 ADDR OF TABLE. W1A00480 0011 1888 49 | SRT 8 W1A00490 0012 807E 50 | A K2 W1A00500 0013 D001 51 | STO LD+1 W1A00510 0014 C700 0000 52 | LD LD L3 *-* W1A00520 0016 807B 53 | A K3 CONVERTED ADDRESS W1A00530 0017 D07D 54 | STO ADDRS W1A00540 0018 6100 55 | LDX 1 0 W1A00550 0019 62FE 56 | LDX 2 -2 W1A00560 001A C500 0000 57 | INPUT LD L1 *-* FETCH TWO INPUT CHARS W1A00570 001C 7400 0000 58 | MDX1 MDX L *-*,0 CHK DIRECTION OF CONVERSION W1A00580 001E 705B 59 | MDX CNVRT 4 OF 8 TO EBCDIC W1A00590 001F 18D0 60 | RTE 16 SEPARATE AND STORE W1A00600 0020 1088 61 | SLT 8 W1A00610 0021 1008 62 | SLA 8 W1A00620 0022 D87D 63 | STD BUKT W1A00630 0023 F06F 64 | LOOP EOR RCDMK CHK FOR RECORD MARK W1A00640 0024 4818 65 | BSC +- SKIP IF NOT W1A00650 0025 C071 66 | LD K8A01 CNVRT E0 TO 6A,PASS TEST 2-3 W1A00660 0026 F06C 67 | EOR RCDMK RESTORE CHAR TO ORIGINAL W1A00670 0027 690A 68 | STX 1 N2+1 2-3 W1A00680 0028 61F9 69 | LDX 1 -7 THIS PART OF THE 2-3 W1A00681 0029 9500 00A0R 70 | N1 S L1 N3+7 *PROGRAM TESTS FOR 2-3 W1A00682 002B 4C18 0031R 71 | BSC L N2,+- *CERTAIN INVALID 2-3 W1A00683 002D 8500 00A0R 72 | A L1 N3+7 *EBC-CHARACTERS IN ORDER 2-3 W1A00684 002F 7101 73 | MDX 1 1 *TO CONVERT THEM TO 2-3 W1A00685 0030 70F8 74 | MDX N1 *BLANK 4 OF 8 CODE 2-3 W1A00686 0031 6500 0000 75 | N2 LDX L1 *-* 2-3 W1A00687 0033 4C18 003AR 76 | BSC L ERR,+- 2-3 W1A00688 0035 D600 00A2R 77 | STO L2 BUKT+2 W1A00689 0037 1002 78 | SLA 2 MODULO 64 W1A00690 0038 4C02 003DR 79 | BSC L OK2,C OK ONLY IF 4 BIT PRESENT W1A00700 003A 1010 80 | ERR SLA 16 NO 4 BIT ERROR W1A00710 003B 2001 81 | LDS 1 W1A00720 003C 282D 82 | STS LDS W1A00730 003D D00E 83 | OK2 STO HOLD+1 CONTINUE VALIDITY CHECK W1A00740 003E 1002 84 | SLA 2 W1A00750 003F 1801 85 | SRA 1 W1A00760 0040 9053 86 | S K9 W1A00770 0041 4C08 0072R 87 | BSC L CONTU,+ W1A00780 0043 C600 00A2R 88 | LD L2 BUKT+2 W1A00790 0045 4C08 003AR 89 | BSC L ERR,+ ERROR IF A-F W1A00800 0047 C004 90 | GATHR LD HOLD+1 BUILD ADDRESS IN STRTB TO W1A00810 0048 180A 91 | SRA 10 FIND 4 OF 8 CHARACTER. W1A00820 0049 804B 92 | A ADDRS W1A00830 004A D001 93 | STO HOLD+1 W1A00840 004B C400 0000 94 | HOLD LD L *-* FETCH CHAR W1A00850 004D E048 95 | AND MASK2 ELIMINATE EBC BITS (8-15) W1A00860 004E D600 00A2R 96 | STO L2 BUKT+2 SAVE CONVERTED CHARACTER W1A00870 0050 C600 00A3R 97 | LD L2 BUKT+3 FETCH NEXT CHARACTER W1A00880 0052 7201 98 | MDX 2 1 W1A00890 0053 70CF 99 | MDX LOOP GO CONVERT SECOND OF TWO W1A00900 0054 C00C 100 | LD OUTPT+1 SET TO STORE 1ST 4 OF 8 W1A00910 0055 D002 101 | STO PUT+1 CHARACTER. W1A00920 0056 C049 102 | LD BUKT GET 1ST CONVERTED CHARACTER W1A00930 0057 D500 0000 103 | PUT STO L1 *-* AND STORE TO OUTPUT BUFFER. W1A00940 0059 7401 0061R 104 | MDX L OUTPT+1,1 TO STORE 2ND CONVERTED CHAR W1A00950 005B 74FF 0070R 105 | MDX L CT,-1 DECR CHAR COUNT W1A00960 005D 7001 106 | MDX *+1 W1A00970 005E 7007 107 | MDX SAV1 EXIT ON ZERO CHAR COUNT W1A00980 005F C041 108 | LD BUKT+1 W1A00990 0060 D500 0000 109 | OUTPT STO L1 *-* ST TO USER'S OUTPUT BUFFER W1A01000 0062 7101 110 | MDX 1 1 INCREMENT BUFFER POINTER W1A01010 0063 74FF 0070R 111 | MDX L CT,-1 DECR CHAR COUNT W1A01020 0065 70B3 112 | MDX INPUT-1 GO CONVERT NEXT TWO CHARS W1A01030 0066 6500 0000 113 | SAV1 LDX L1 *-* RESTORE USERS XR1 W1A01040 0068 6600 0000 114 | SAV2 LDX L2 *-* RESTORE USERS XR2 W1A01050 006A 2000 115 | LDS LDS 0 W1A01060 006B C802 116 | LDD AQ W1A01070 006C 4C00 0000 117 | XIT BSC L *-* RETURN TO USER W1A01080 006E 118 | AQ BSS E 2 ACC AND EXT TEMP. W1A01081 0070 0000 119 | CT DC CHAR COUNT TEMP. W1A01082 0071 228D*98C2 120 | LIBF LIBF STRTB CALL STRTB,1 WORD CALL W1A01083 0072 8025 121 | CONTU A K7 W1A01090 0073 4C28 0047R 122 | BSC L GATHR,Z+ NO CHK IF RT HEX IS 0 OR 1 W1A01100 0075 C600 00A2R 123 | LD L2 BUKT+2 ENSURE LFT HEX IS C THRU F W1A01110 0077 4C10 003AR 124 | BSC L ERR,- W1A01120 0079 70CD 125 | MDX GATHR OK - GO CONVERT W1A01130 007A 6A02 126 | CNVRT STX 2 SVX2+1 SET TO PROCESS 2 CHARACTERS W1A01140 007B 089C*3940 127 | LIBF HXCV CONVERT 4OF8 TO 0-63 RLTV W1A01150 007C 6600 0000 128 | SVX2 LDX L2 *-* W1A01160 007E 8016 129 | A ADDRS ADD BASE ADDR OF STRTB W1A01170 007F 9012 130 | S K3 ADJUST W1A01180 0080 D001 131 | STO *+1 W1A01190 0081 C400 0000 132 | LD L *-* FETCH EBCDIC CHAR W1A01200 0083 1008 133 | SLA 8 ELIMINATE 4 OF 8 BITS W1A01210 0084 D600 00A2R 134 | STO L2 BUKT+2 W1A01220 0086 7201 135 | MDX 2 1 W1A01230 0087 7003 136 | MDX JUMP GO PROCESS NEXT CHARACTER W1A01240 0088 1808 137 | SRA 8 CHARS INTO ONE WORD W1A01250 0089 E816 138 | OR BUKT W1A01260 008A 70D5 139 | MDX OUTPT GO STORE 2 CHARS IN OUTPUT W1A01270 008B 7401 001BR 140 | JUMP MDX L INPUT+1,1 POINT TO NEXT INPUT CHAR W1A01280 008D 74FF 0070R 141 | MDX L CT,-1 DECR CHAR COUNT W1A01290 008F 708A 142 | MDX INPUT GO FETCH NEXT INPUT CHAR W1A01300 0090 70CF 143 | MDX OUTPT GO STORE LAST CHARACTER W1A01310 0091 0002 144 | K2 DC 2 ADDR MODIFICATION CONSTANT W1A01350 0092 0003 145 | K3 DC 3 ADDR MODIFICATION CONSTANT W1A01360 0093 E000 146 | RCDMK DC /E000 RECORD MARK CONSTANT W1A01370 0094 4800 147 | K9 DC /4800 VALIDITY CHECK CONSTANT W1A01380 0095 0000 148 | ADDRS DC BASE ADDR OF STRTB TABLE W1A01390 0096 FF00 149 | MASK2 DC /FF00 LEFT DIGIT EXTRACT MASK W1A01400 0097 8A01 150 | K8A01 DC /8A01 RECORD MARK CONST. 2-3 W1A01410 0098 3800 151 | K7 DC /3800 VALIDITY CHK CONSTANT W1A01420 0099 4100 152 | N3 DC /4100 INVALID EBC-CHAR 2-3 W1A01421 009A 5100 153 | DC /5100 INVALID EBC-CHAR 2-3 W1A01422 009B 6A00 154 | DC /6A00 INVALID EBC-CHAR 2-3 W1A01423 009C 7000 155 | DC /7000 INVALID EBC-CHAR 2-3 W1A01424 009D 7100 156 | DC /7100 INVALID EBC-CHAR 2-3 W1A01425 009E D000 157 | DC /D000 INVALID EBC-CHAR 2-3 W1A01426 009F E100 158 | DC /E100 INVALID EBC-CHAR 2-3 W1A01427 00A0 159 | BUKT BSS E 2 CONVERTED CHAR TEMPORARY W1A01430 00A2 160 | END W1A01440 There were no errors in this assembly === CROSS REFERENCES ========================================================== Name Val Defd Referenced ADDRS 0095R 148 54 92 129 AQ 006ER 118 35 116 BUKT 00A0R 159 63 77 88 96 97 102 108 123 134 138 CNVRT 007AR 126 59 CONTU 0072R 121 87 CT 0070R 119 43 105 111 141 EBC48 0000R 33 ERR 003AR 80 76 89 124 GATHR 0047R 90 122 125 HOLD 004BR 94 83 90 93 INPUT 001AR 57 39 112 140 142 JUMP 008BR 140 136 K2 0091R 144 50 K3 0092R 145 53 130 K7 0098R 151 121 K8A01 0097R 150 66 K9 0094R 147 86 LD 0014R 52 51 LDS 006AR 115 36 82 LIBF 0071R 120 47 LOOP 0023R 64 99 MASK2 0096R 149 95 MDX1 001CR 58 37 N1 0029R 70 74 N2 0031R 75 68 71 N3 0099R 152 70 72 OK2 003DR 83 79 OUTPT 0060R 109 41 100 104 139 143 PUT 0057R 103 101 RCDMK 0093R 146 64 67 SAV1 0066R 113 33 107 SAV2 0068R 114 46 SVX2 007CR 128 126 XIT 006CR 117 45