
	program xmodtoexe
c  reconstruct an .EXE file from 128 byte records from XMODEM transfer
	character line*256, input*128, output*128
	integer blank
	byte outrecord(512), in1(128), in2(128), in3(128), in4(128)
	equivalence (outrecord,in1),(outrecord(129),in2)
	equivalence (outrecord(257),in3),(outrecord(385),in4)

	call lib$get_foreign(line,'$_From  To: ',)

	blank=index(line,' ')
	input=line( 1:blank )
	output=line( blank:)

	open(6,file=input,status='OLD',readonly)
c  note RECL is number of longwords for unformatted
	open(7,file=output,status='NEW',carriagecontrol='NONE',
	1           recl=128,recordtype='FIXED',form='unformatted')

  100	read(6,1,end=200) in1
	read(6,1,end=300) in2
	read(6,1,end=300) in3
	read(6,1,end=300) in4
    1	format(128a)
	write(7) outrecord
	goto 100

  300	print *,' EXETOXMOD-F-  4*x not equal number of records.'
  200	call exit

  	end
nds.
TOXMOD.FOR     TOXMOD.FOR, converts VAX text file (variable length
                    records with no CRLF)