forked from z390development/z390
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathP5MM1.MLC
36 lines (36 loc) · 949 Bytes
/
P5MM1.MLC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
*
* SAMPLE CODE TO TRANSLATE TRUE HEX TO PRINTABLE HEX
* AND BACK TO HEX USING ARCHAIC METHODS
*
* IT IS COMPLEX TO DO LONG STREAMS WITH THIS METHOD
*
P5MM1 ZMFACC CODE,START,NAME='Melvyn Maltz'
* CONVERT BIN TO HEX CHAR
UNPK MYCHAR,MYHEX(7) UNPACK HEX STREAM
TR MYCHAR,TABLE-240 TRANSLATE TO CHAR FORM
* CONVERT HEX CHAR BACK TO BIN
MVC WORK,MYCHAR SAVE FOR RECONVERT
TR WORK(12),TRANHXCH-X'C1' TRANSLATE TO UNPACKED HEX
PACK MYHEX2,WORK PACK BACK TO HEX
ZMFACC CODE,END
MYHEX DC X'FFA193BC120A' HEX DATA
DC X'00' DUMMY BYTE
ZMFACC INPUT,START
MYCHAR DS XL13 CHAR DATA
ZMFACC INPUT,END
WORK DS XL13 CHAR DATA
ZMFACC OUTPUT,START
MYHEX2 DS XL7 BACK TO HEX
ZMFACC OUTPUT,END
*
* C1C2C3C4C5C6
TRANHXCH DC X'0A0B0C0D0E0F000000000000000000' C1-CF
DC 32X'00' D0-EF
* F0F1F2F3F4F5F6F7F8F9
DC X'00010203040506070809000000000000' F0-FF
*
TABLE DC C'0123456789ABCDEF'
*
LTORG
*
END