7 integer*2 ints(4),isync
9 byte inbuf(512),inrec(22180),outrec(13860),b10(5),bint(8)
10 byte frsync(7),ausync(125)
13 data outrec/13860*0/,ints/4*0/
15 data frsync/x
'a1',x
'16',x
'fd',x
'71',x
'9d',x
'83',x
'c9'/
17 * x
'f8',x
'bf',x
'36',x
'd6',x
'bd',x
'a1',x
'11',x
'57',x
'11',x
'd3',
18 * x
'd0',x
'4e',x
'0a',x
'db',x
'de',x
'37',x
'19',x
'9f',
19 * x
'c9',x
'93',x
'a3',x
'86',x
'90',x
'fb',x
'63',
20 * x
'12',x
'c9',x
'55',x
'02',x
'd5',x
'a7',x
'24',x
'5d',
21 * x
'88',x
'6d',x
'29',x
'ba',x
'df',x
'f8',x
'3b',
22 * x
'f7',x
'4b',x
'67',x
'34',x
'c5',x
'bb',x
'd6',x
'7b',
23 * x
'00',x
'42',x
'60',x
'ce',x
'ed',x
'4a',x
'ea',
24 * x
'76',x
'63',x
'd4',x
'68',x
'06',x
'35',x
'0a',x
'99',
25 * x
'be',x
'f9',x
'f4',x
'd5',x
'23',x
'e5',x
'c0',
26 * x
'52',x
'f8',x
'fd',x
'56',x
'18',x
'50',x
'eb',x
'fb',
27 * x
'21',x
'72',x
'07',x
'b8',x
'48',x
'3f',x
'd1',
28 * x
'47',x
'89',x
'e0',x
'6b',x
'1c',x
'b0',x
'46',x
'46',
29 * x
'c2',x
'03',x
'9e',x
'44',x
'd1',x
'05',x
'e9',
30 * x
'2e',x
'86',x
'56',x
'5a',x
'30',x
'25',x
'16',x
'6b',
31 * x
'98',x
'71',x
'db',x
'9c',x
'57',x
'd7',x
'72',
32 * x
'83',x
'79',x
'd5',x
'e5',x
'44',x
'93',x
'65',x
'27',x
'c3',x
'cc'/
34 equivalence(ints,bint)
36 write(*,*)
'Enter Level 0 file name'
37 read (5,
'(a50)') l0file
38 write(*,*)
'Enter Output file name'
39 read (5,
'(a50)') outfile
41 open(unit=11,file=l0file,access=
'direct',recl=22180,
42 * status=
'old',action=
'READ')
43 open(unit=12,file=outfile,access=
'direct',recl=13860)
50 outrec(i+13735) = ausync(i)
61 read (11,err=999,rec=irec) inrec
75 bint(i) = inrec(i+(l-1)*8)
79 outrec(i+(l-1)*5) = b10(i)
83 write (12,rec=nrec) outrec
85 if (mod(nrec,100) .eq. 0)
then
86 write(*,*)
'Writing record ',nrec
104 integer*2 m3fc,m003,m3f0,m3c0,m300,m00f,m03f,m0ff
105 data m3fc/1020/,m003/3/,m3f0/1008/,m00f/15/
106 data m3c0/960/,m03f/63/,m300/768/,m0ff/255/
107 bit10(1) = iand(ints(1),m3fc)/4
108 bit10(2) = iand(ints(1),m003)*64 + iand(ints(2),m3f0)/16
109 bit10(3) = iand(ints(2),m00f)*16 + iand(ints(3),m3c0)/64
110 bit10(4) = iand(ints(3),m03f)*4 + iand(ints(4),m300)/256
111 bit10(5) = iand(ints(4),m0ff)