	subroutine time05(t0,t5)
c ** 16-Nov-87 **  with byte swap *** 22-Jan-01 ***
	integer t0(2),t3(3),t5(5),and,rshift,lshift
c t0 = 5-byte time in ms on PSE 9-track event tape
c t3 = day, hrmn, msec
c t5 = day, hour, minute, sec, ms
c
	it=and(lshift(t0(1),24),'7f000000'x)+and(lshift(t0(1),8),'ff0000'x)
	1+and(rshift(t0(1),8),'ff00'x)+and(rshift(t0(1),24),'ff'x)
	t5(1)=it/5400000
	it=it-t5(1)*5400000
	t5(2)=it/225000
	it=it-t5(2)*225000
	t5(3)=it/3750
	it=(it-t5(3)*3750)*16+and(rshift(t0(2),4),'f'x)
	t5(4)=it/1000
	t5(5)=it-t5(4)*1000
	return
c
	entry time53(t5,t3)
	t3(1)=t5(1)
	t3(2)=t5(2)*100+t5(3)
	t3(3)=t5(4)*1000+t5(5)
	return
c
	entry time35(t3,t5)
	t5(1)=t3(1)
	t5(2)=t3(2)/100
	t5(3)=t3(2)-t5(2)*100
	t5(4)=t3(3)/1000
	t5(5)=t3(3)-t5(4)*1000
	return
c
	entry time50(t5,t0)
	it=t5(4)*1000+t5(5)
	t0(2)=lshift(mod(it,16),4)
	it=((t5(1)*24+t5(2))*60+t5(3))*3750+it/16
	t0(1)=and(lshift(it,24),'ff000000'x)+and(lshift(it,8),'ff0000'x)
	1+and(rshift(it,8),'ff00'x)+and(rshift(it,24),'ff'x)
	return
	end

	subroutine time03(t0,t3)
	integer t0(2),t3(3),t5(5)
	call time05(t0,t5)
	call time53(t5,t3)
	return
c
	entry time30(t3,t0)
	call time35(t3,t5)
	call time50(t5,t0)
	return
	end

