
	program exe
c  hack an .EXE file into 128 byte records for XMODEM transfer
	character line*256, input*128, output*128
	integer blank
	byte inrecord(512), out1(128), out2(128), out3(128), out4(128)
	equivalence (inrecord,out1),(inrecord(129),out2)
	equivalence (inrecord(257),out3),(inrecord(385),out4)

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

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

	open(6,file=input,status='OLD',form='unformatted',readonly)
	open(7,file=output,status='NEW',carriagecontrol='NONE',
	1           recl=128,recordtype='FIXED')

  100	read(6,end=200) inrecord
	write(7,1) out1
	write(7,1) out2
	write(7,1) out3
	write(7,1) out4
    1	format(128a)
	goto 100

  200	print *,' end of file'
	call exit
  	end
arity bit)
	send next filename character
	(in CP/M FCB form, no dot,
	blank filled, last 3 bytes
	are type)