Hello Steve,
I din lied but found the solution also.
here's the code:
ADD CSECT
STM 14,12,12(13) SAVE THE REGISTERS
LR 12,15 MEKE R12 THE BASE REGISTER
USING ADD,12 FINISH THE JOB
LA 11,REGSAVE POINT TO SAVE AREA
ST 13,4(11) SAVE CURRENT R13
ST 11,8(13) INFORM THE OS
LR 13,11 ESTABLISH NEW R13
*
WTO 'MULTIPLICATION'
MP BYTES,=P'1024'
UNPK W_A,BYTES
OI W_A+6,X'F0'
MVC WTOA+8(9),W_A PRINT OUTLINE
WTOA WTO 'XXXXXXXXX IS W_A'
*
*
L 13,4(13) RESTORE R13 TO ORIGINAL
LM 14,12,12(13) RESTORE THE REGS
SR 15,15 EVERYTHING WENT OK
BCR B'1111',14 RETURN TO THE SYSTEM
*
BYTES DC PL5'373'
W_A DC PL7'0000000'
W_B DC PL7'0000000'
REGSAVE DS 18F
END
Compiled steps:
000000 00000 000CB 1 ADD CSECT
000000 90EC D00C 0000C 2 STM 14,12,12(13)
000004 18CF 3 LR 12,15
R:C 00000 4 USING ADD,12
000006 41B0 C080 00080 5 LA 11,REGSAVE
00000A 50DB 0004 00004 6 ST 13,4(11)
00000E 50BD 0008 00008 7 ST 11,8(13)
000012 18DB 8 LR 13,11
9 *
10 WTO 'MULTIPLICATION'
000014 12+ CNOP 0,4
000014 A715 000B 0002A 13+ BRAS 1,IHB0001A
000018 0012 14+ DC AL2(18)
00001A 0000 15+ DC B'0000000000000000'
00001C D4E4D3E3C9D7D3C9 16+ DC C'MULTIPLICATION'
00002A 17+IHB0001A DS 0H
00002A 0A23 18+ SVC 35
00002C FC42 C06A C0C8 0006A 000C8 19 MP BYTES,=P'1024'
000032 F364 C06F C06A 0006F 0006A 20 UNPK W_A,BYTES
000038 96F0 C075 00075 21 OI W_A+6,X'F0'
00003C D208 C04C C06F 0004C 0006F 22 MVC WTOA+8(9),W_A
23 WTOA WTO 'XXXXXXXXX IS W_A'
000042 0700 25+ CNOP 0,4
000044 A715 000C 0005C 26+WTOA BRAS 1,IHB0003A
000048 0014 27+ DC AL2(20)
00004A 0000 28+ DC B'0000000000000000'
00004C E7E7E7E7E7E7E7E7 29+ DC C'XXXXXXXXX IS W_A'
00005C 30+IHB0003A DS 0H
00005C 0A23 31+ SVC 35
32 *
00005E 58DD 0004 00004 33 L 13,4(13)
000062 98EC D00C 0000C 34 LM 14,12,12(13)
000066 1BFF 35 SR 15,15
000068 07FE 36 BCR B'1111',14
37 *
00006A 000000373C 38 BYTES DC PL5'373'
00006F 0000000000000C 39 W_A DC PL7'0000000'
000076 0000000000000C 40 W_B DC PL7'0000000'
000080 41 REGSAVE DS 18F
42 END
0000C8 01024C 43 =P'1024'
Output:
MULTIPLICATION
0381952 IS W_A
Please have a look. And i Just asked how to remove the signed bit in the last.
Regards
Utpal