1
2
3
4
5 bcd_message: proc (ml, mw, bp, m);
6
7
8
9
10
11
12
13
14 dcl ml bit(18) unal parm;
15 dcl mw fixed bin(18)unsigned unal parm;
16 dcl bp ptr parm;
17 dcl m char(*)parm;
18 ml = "0"b;
19 mw = 0;
20
21 l = length (m);
22 n = divide (l+5, 6, 17, 0);
23 if n>355 then do;
24 n = 355;
25 l = n*6;
26 end;
27
28 bmp = addrel (bp, 25);
29 call gtss_ascii_bcd_ (addr (m), l, bmp);
30 f = mod (l, 6);
31
32 if f>0 then msg.last_word.blank = "20"b3;
33 ml = rel (bmp);
34 mw = n;
35 return;
36 dcl n fixed bin;
37 dcl f fixed bin;
38 dcl l fixed bin;
39
40 dcl bmp ptr;
41 dcl 1 msg aligned based(bmp),
42 2 fill (n-1),
43 2 last_word,
44 3 skip (f)bit(6)unal,
45 3 blank (6-f)bit(6)unal;
46 end ;
47